# Highlighting Inconsistent behaviour

**URL:** https://discuss.elastic.co/t/highlighting-inconsistent-behaviour/9724
**Category:** Elasticsearch
**Created:** [November 15, 2012, 9:08am UTC](https://discuss.elastic.co/t/highlighting-inconsistent-behaviour/9724 "2012-11-15T09:08:09Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![Eric\_Kazaki](https://avatars.discourse-cdn.com/v4/letter/e/e47c2d/32.png) [@Eric\_Kazaki](https://discuss.elastic.co/u/Eric_Kazaki)
#### Post date: [November 15, 2012, 9:08am UTC](https://discuss.elastic.co/t/highlighting-inconsistent-behaviour/9724/1 "2012-11-15T09:08:09Z")

</div>

Hi

I'm testing highlighting and getting very strange errors on a 3 nodes  
cluster. Without highlighting the query runs fine and I get all the  
documents I want without failures. When I add highlighting, the same query  
returns with failures and this number is fluctuating even though the  
documents haven't changed.

The highlighting part of the query is:  
"highlight": {  
"number\_of\_fragments": 10,  
"fragment\_size": 10,  
"pre\_tags": [""],  
"post\_tags": [""],  
"fields": {  
"title": {"number\_of\_fragments": 0},  
"body": {"number\_of\_fragments": 1}  
}  
}

"body" isn't a stored field so it's being fetched from "\_source" but  
"title" is stored.

Running the query with highlighting causes this:

- failed: 1
- failures: [
  - {
    - status: 500
    - reason: RemoteTransportException[Failed to deserialize response  
of type [org.elasticsearch.search.fetch.FetchSearchResult]]; nested:  
TransportSerializationException[Failed to deserialize response of type  
[org.elasticsearch.search.fetch.FetchSearchResult]]; nested:  
IndexOutOfBoundsException[Invalid combined index of 200554, maximum is  
855];  
}  
]

- 

Repeating the same query:

- failed: 2
- failures: [
  - {
    - status: 500
    - reason: RemoteTransportException[Failed to deserialize response  
of type [org.elasticsearch.search.fetch.FetchSearchResult]]; nested:  
TransportSerializationException[Failed to deserialize response of type  
[org.elasticsearch.search.fetch.FetchSearchResult]]; nested:  
IndexOutOfBoundsException[Invalid combined index of 199753, maximum is  
819];  
}

  - {
    - status: 500
    - reason: RemoteTransportException[Failed to deserialize response  
of type [org.elasticsearch.search.fetch.FetchSearchResult]]; nested:  
TransportSerializationException[Failed to deserialize response of type  
[org.elasticsearch.search.fetch.FetchSearchResult]]; nested:  
IndexOutOfBoundsException[Invalid combined index of 200584, maximum is  
885];  
}  
]

It's the same set of documents that are failing but I can't guess why!

--

---

<div class="post-metadata">

### Author: ![simonw\_2](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/simonw_2/32/1130_2.png) [@simonw\_2](https://discuss.elastic.co/u/simonw_2)
#### Post date: [November 15, 2012, 9:14am UTC](https://discuss.elastic.co/t/highlighting-inconsistent-behaviour/9724/2 "2012-11-15T09:14:13Z")

</div>

Hey Eric,

can you provide a repeateable example of this like a couple of curl  
commands including a sample document? I'd also be interested what version  
of ES you are using?

simon

On Thursday, November 15, 2012 10:08:09 AM UTC+1, Eric Kazaki wrote:

> Hi
> 
> I'm testing highlighting and getting very strange errors on a 3 nodes  
> cluster. Without highlighting the query runs fine and I get all the  
> documents I want without failures. When I add highlighting, the same query  
> returns with failures and this number is fluctuating even though the  
> documents haven't changed.
> 
> The highlighting part of the query is:  
> "highlight": {  
> "number\_of\_fragments": 10,  
> "fragment\_size": 10,  
> "pre\_tags": [""],  
> "post\_tags": [""],  
> "fields": {  
> "title": {"number\_of\_fragments": 0},  
> "body": {"number\_of\_fragments": 1}  
> }  
> }
> 
> "body" isn't a stored field so it's being fetched from "\_source" but  
> "title" is stored.
> 
> Running the query with highlighting causes this:
> 
> - failed: 1
> - failures: [
> - {
> - status: 500
> - reason: RemoteTransportException[Failed to deserialize  
> response of type [org.elasticsearch.search.fetch.FetchSearchResult]];  
> nested: TransportSerializationException[Failed to deserialize response of  
> type [org.elasticsearch.search.fetch.FetchSearchResult]]; nested:  
> IndexOutOfBoundsException[Invalid combined index of 200554, maximum is  
> 855];  
> }  
> ]
> 
> - 
> 
> Repeating the same query:
> 
> - failed: 2
> - failures: [
> - {
> - status: 500
> - reason: RemoteTransportException[Failed to deserialize  
> response of type [org.elasticsearch.search.fetch.FetchSearchResult]];  
> nested: TransportSerializationException[Failed to deserialize response of  
> type [org.elasticsearch.search.fetch.FetchSearchResult]]; nested:  
> IndexOutOfBoundsException[Invalid combined index of 199753, maximum is  
> 819];  
> }
> 
> - {
> - status: 500
> - reason: RemoteTransportException[Failed to deserialize  
> response of type [org.elasticsearch.search.fetch.FetchSearchResult]];  
> nested: TransportSerializationException[Failed to deserialize response of  
> type [org.elasticsearch.search.fetch.FetchSearchResult]]; nested:  
> IndexOutOfBoundsException[Invalid combined index of 200584, maximum is  
> 885];  
> }  
> ]
> 
> It's the same set of documents that are failing but I can't guess why!

--

---

<div class="post-metadata">

### Author: ![Eric\_Kazaki](https://avatars.discourse-cdn.com/v4/letter/e/e47c2d/32.png) [@Eric\_Kazaki](https://discuss.elastic.co/u/Eric_Kazaki)
#### Post date: [November 15, 2012, 10:06am UTC](https://discuss.elastic.co/t/highlighting-inconsistent-behaviour/9724/3 "2012-11-15T10:06:25Z")

</div>

Hey Simon

It's running on version 0.19.9. Here's is the stuff you requested  
[ElasticSearch Highlighting IndexOutOfBoundsException · GitHub](https://gist.github.com/4077780). Just removed some of the fields in the  
sample documents that are irrelevant.

On Thursday, November 15, 2012 11:08:09 AM UTC+2, Eric Kazaki wrote:

> Hi
> 
> I'm testing highlighting and getting very strange errors on a 3 nodes  
> cluster. Without highlighting the query runs fine and I get all the  
> documents I want without failures. When I add highlighting, the same query  
> returns with failures and this number is fluctuating even though the  
> documents haven't changed.
> 
> The highlighting part of the query is:  
> "highlight": {  
> "number\_of\_fragments": 10,  
> "fragment\_size": 10,  
> "pre\_tags": [""],  
> "post\_tags": [""],  
> "fields": {  
> "title": {"number\_of\_fragments": 0},  
> "body": {"number\_of\_fragments": 1}  
> }  
> }
> 
> "body" isn't a stored field so it's being fetched from "\_source" but  
> "title" is stored.
> 
> Running the query with highlighting causes this:
> 
> - failed: 1
> - failures: [
> - {
> - status: 500
> - reason: RemoteTransportException[Failed to deserialize  
> response of type [org.elasticsearch.search.fetch.FetchSearchResult]];  
> nested: TransportSerializationException[Failed to deserialize response of  
> type [org.elasticsearch.search.fetch.FetchSearchResult]]; nested:  
> IndexOutOfBoundsException[Invalid combined index of 200554, maximum is  
> 855];  
> }  
> ]
> 
> - 
> 
> Repeating the same query:
> 
> - failed: 2
> - failures: [
> - {
> - status: 500
> - reason: RemoteTransportException[Failed to deserialize  
> response of type [org.elasticsearch.search.fetch.FetchSearchResult]];  
> nested: TransportSerializationException[Failed to deserialize response of  
> type [org.elasticsearch.search.fetch.FetchSearchResult]]; nested:  
> IndexOutOfBoundsException[Invalid combined index of 199753, maximum is  
> 819];  
> }
> 
> - {
> - status: 500
> - reason: RemoteTransportException[Failed to deserialize  
> response of type [org.elasticsearch.search.fetch.FetchSearchResult]];  
> nested: TransportSerializationException[Failed to deserialize response of  
> type [org.elasticsearch.search.fetch.FetchSearchResult]]; nested:  
> IndexOutOfBoundsException[Invalid combined index of 200584, maximum is  
> 885];  
> }  
> ]
> 
> It's the same set of documents that are failing but I can't guess why!

--

---

<div class="post-metadata">

### Author: ![Igor\_Motov](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/igor_motov/32/45193_2.png) [@Igor\_Motov](https://discuss.elastic.co/u/Igor_Motov)
#### Post date: [November 15, 2012, 7:33pm UTC](https://discuss.elastic.co/t/highlighting-inconsistent-behaviour/9724/4 "2012-11-15T19:33:07Z")

</div>

Hmm, I think some important bits of information are missing here. At least,  
I cannot reproduce it based on your gist:  
[https://groups.google.com/d/topic/elasticsearch/X86pR6UK-kY/discussion · GitHub](https://gist.github.com/9be449c5072fb643fc82) I have a few questions though.

Can you see any corresponding error messages in log files on any of the  
nodes?  
Can you retrieve one tweet at a time to see if it still fails?  
I noticed that the second tweet was written in Japanese but in your example  
all japanese characters are replaced with "???????". Not sure where it's  
getting broken.  
Could you repeat the same query and increase fragment size to 20? Does it  
still fail?

On Thursday, November 15, 2012 5:06:25 AM UTC-5, Eric Kazaki wrote:

> Hey Simon
> 
> It's running on version 0.19.9. Here's is the stuff you requested  
> [ElasticSearch Highlighting IndexOutOfBoundsException · GitHub](https://gist.github.com/4077780). Just removed some of the fields in the  
> sample documents that are irrelevant.
> 
> On Thursday, November 15, 2012 11:08:09 AM UTC+2, Eric Kazaki wrote:
> 
> > Hi
> > 
> > I'm testing highlighting and getting very strange errors on a 3 nodes  
> > cluster. Without highlighting the query runs fine and I get all the  
> > documents I want without failures. When I add highlighting, the same query  
> > returns with failures and this number is fluctuating even though the  
> > documents haven't changed.
> > 
> > The highlighting part of the query is:  
> > "highlight": {  
> > "number\_of\_fragments": 10,  
> > "fragment\_size": 10,  
> > "pre\_tags": [""],  
> > "post\_tags": [""],  
> > "fields": {  
> > "title": {"number\_of\_fragments": 0},  
> > "body": {"number\_of\_fragments": 1}  
> > }  
> > }
> > 
> > "body" isn't a stored field so it's being fetched from "\_source" but  
> > "title" is stored.
> > 
> > Running the query with highlighting causes this:
> > 
> > - failed: 1
> > - failures: [
> > - {
> > - status: 500
> > - reason: RemoteTransportException[Failed to deserialize  
> > response of type [org.elasticsearch.search.fetch.FetchSearchResult]];  
> > nested: TransportSerializationException[Failed to deserialize response of  
> > type [org.elasticsearch.search.fetch.FetchSearchResult]]; nested:  
> > IndexOutOfBoundsException[Invalid combined index of 200554, maximum is  
> > 855];  
> > }  
> > ]
> > 
> > - 
> > 
> > Repeating the same query:
> > 
> > - failed: 2
> > - failures: [
> > - {
> > - status: 500
> > - reason: RemoteTransportException[Failed to deserialize  
> > response of type [org.elasticsearch.search.fetch.FetchSearchResult]];  
> > nested: TransportSerializationException[Failed to deserialize response of  
> > type [org.elasticsearch.search.fetch.FetchSearchResult]]; nested:  
> > IndexOutOfBoundsException[Invalid combined index of 199753, maximum is  
> > 819];  
> > }
> > 
> > - {
> > - status: 500
> > - reason: RemoteTransportException[Failed to deserialize  
> > response of type [org.elasticsearch.search.fetch.FetchSearchResult]];  
> > nested: TransportSerializationException[Failed to deserialize response of  
> > type [org.elasticsearch.search.fetch.FetchSearchResult]]; nested:  
> > IndexOutOfBoundsException[Invalid combined index of 200584, maximum is  
> > 885];  
> > }  
> > ]
> > 
> > It's the same set of documents that are failing but I can't guess why!

--

---

<div class="post-metadata">

### Author: ![Eric\_Kazaki](https://avatars.discourse-cdn.com/v4/letter/e/e47c2d/32.png) [@Eric\_Kazaki](https://discuss.elastic.co/u/Eric_Kazaki)
#### Post date: [November 16, 2012, 11:03am UTC](https://discuss.elastic.co/t/highlighting-inconsistent-behaviour/9724/5 "2012-11-16T11:03:02Z")

</div>

I've attached the log to the gist  
([ElasticSearch Highlighting IndexOutOfBoundsException · GitHub](https://gist.github.com/4077780#file_error%20log)). Also double checked my  
mapping and all those fields are stored. Could it be related to the fact  
that some hits have the wrong encoding?

On Thursday, November 15, 2012 11:08:09 AM UTC+2, Eric Kazaki wrote:

> Hi
> 
> I'm testing highlighting and getting very strange errors on a 3 nodes  
> cluster. Without highlighting the query runs fine and I get all the  
> documents I want without failures. When I add highlighting, the same query  
> returns with failures and this number is fluctuating even though the  
> documents haven't changed.
> 
> The highlighting part of the query is:  
> "highlight": {  
> "number\_of\_fragments": 10,  
> "fragment\_size": 10,  
> "pre\_tags": [""],  
> "post\_tags": [""],  
> "fields": {  
> "title": {"number\_of\_fragments": 0},  
> "body": {"number\_of\_fragments": 1}  
> }  
> }
> 
> "body" isn't a stored field so it's being fetched from "\_source" but  
> "title" is stored.
> 
> Running the query with highlighting causes this:
> 
> - failed: 1
> - failures: [
> - {
> - status: 500
> - reason: RemoteTransportException[Failed to deserialize  
> response of type [org.elasticsearch.search.fetch.FetchSearchResult]];  
> nested: TransportSerializationException[Failed to deserialize response of  
> type [org.elasticsearch.search.fetch.FetchSearchResult]]; nested:  
> IndexOutOfBoundsException[Invalid combined index of 200554, maximum is  
> 855];  
> }  
> ]
> 
> - 
> 
> Repeating the same query:
> 
> - failed: 2
> - failures: [
> - {
> - status: 500
> - reason: RemoteTransportException[Failed to deserialize  
> response of type [org.elasticsearch.search.fetch.FetchSearchResult]];  
> nested: TransportSerializationException[Failed to deserialize response of  
> type [org.elasticsearch.search.fetch.FetchSearchResult]]; nested:  
> IndexOutOfBoundsException[Invalid combined index of 199753, maximum is  
> 819];  
> }
> 
> - {
> - status: 500
> - reason: RemoteTransportException[Failed to deserialize  
> response of type [org.elasticsearch.search.fetch.FetchSearchResult]];  
> nested: TransportSerializationException[Failed to deserialize response of  
> type [org.elasticsearch.search.fetch.FetchSearchResult]]; nested:  
> IndexOutOfBoundsException[Invalid combined index of 200584, maximum is  
> 885];  
> }  
> ]
> 
> It's the same set of documents that are failing but I can't guess why!

--

---

<div class="post-metadata">

### Author: ![Igor\_Motov](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/igor_motov/32/45193_2.png) [@Igor\_Motov](https://discuss.elastic.co/u/Igor_Motov)
#### Post date: [November 16, 2012, 11:19am UTC](https://discuss.elastic.co/t/highlighting-inconsistent-behaviour/9724/6 "2012-11-16T11:19:40Z")

</div>

If it's encoding, it would be nice to be able to reproduce it. Could you do  
this:

curl -s "[http://your-server:9200/twitter/tweet/7211941?fields=title,body](http://your-server:9200/twitter/tweet/7211941?fields=title,body)" \>  
rec.txt

and then post rec.txt somewhere as is, so it has all characters in body  
preserved?

On Friday, November 16, 2012 6:03:02 AM UTC-5, Eric Kazaki wrote:

> I've attached the log to the gist (  
> [ElasticSearch Highlighting IndexOutOfBoundsException · GitHub](https://gist.github.com/4077780#file_error%20log)). Also double checked my  
> mapping and all those fields are stored. Could it be related to the fact  
> that some hits have the wrong encoding?
> 
> On Thursday, November 15, 2012 11:08:09 AM UTC+2, Eric Kazaki wrote:
> 
> > Hi
> > 
> > I'm testing highlighting and getting very strange errors on a 3 nodes  
> > cluster. Without highlighting the query runs fine and I get all the  
> > documents I want without failures. When I add highlighting, the same query  
> > returns with failures and this number is fluctuating even though the  
> > documents haven't changed.
> > 
> > The highlighting part of the query is:  
> > "highlight": {  
> > "number\_of\_fragments": 10,  
> > "fragment\_size": 10,  
> > "pre\_tags": [""],  
> > "post\_tags": [""],  
> > "fields": {  
> > "title": {"number\_of\_fragments": 0},  
> > "body": {"number\_of\_fragments": 1}  
> > }  
> > }
> > 
> > "body" isn't a stored field so it's being fetched from "\_source" but  
> > "title" is stored.
> > 
> > Running the query with highlighting causes this:
> > 
> > - failed: 1
> > - failures: [
> > - {
> > - status: 500
> > - reason: RemoteTransportException[Failed to deserialize  
> > response of type [org.elasticsearch.search.fetch.FetchSearchResult]];  
> > nested: TransportSerializationException[Failed to deserialize response of  
> > type [org.elasticsearch.search.fetch.FetchSearchResult]]; nested:  
> > IndexOutOfBoundsException[Invalid combined index of 200554, maximum is  
> > 855];  
> > }  
> > ]
> > 
> > - 
> > 
> > Repeating the same query:
> > 
> > - failed: 2
> > - failures: [
> > - {
> > - status: 500
> > - reason: RemoteTransportException[Failed to deserialize  
> > response of type [org.elasticsearch.search.fetch.FetchSearchResult]];  
> > nested: TransportSerializationException[Failed to deserialize response of  
> > type [org.elasticsearch.search.fetch.FetchSearchResult]]; nested:  
> > IndexOutOfBoundsException[Invalid combined index of 199753, maximum is  
> > 819];  
> > }
> > 
> > - {
> > - status: 500
> > - reason: RemoteTransportException[Failed to deserialize  
> > response of type [org.elasticsearch.search.fetch.FetchSearchResult]];  
> > nested: TransportSerializationException[Failed to deserialize response of  
> > type [org.elasticsearch.search.fetch.FetchSearchResult]]; nested:  
> > IndexOutOfBoundsException[Invalid combined index of 200584, maximum is  
> > 885];  
> > }  
> > ]
> > 
> > It's the same set of documents that are failing but I can't guess why!

--

---

<div class="post-metadata">

### Author: ![Eric\_Kazaki](https://avatars.discourse-cdn.com/v4/letter/e/e47c2d/32.png) [@Eric\_Kazaki](https://discuss.elastic.co/u/Eric_Kazaki)
#### Post date: [November 19, 2012, 11:52am UTC](https://discuss.elastic.co/t/highlighting-inconsistent-behaviour/9724/7 "2012-11-19T11:52:01Z")

</div>

It seems to be related  
to [https://groups.google.com/d/topic/elasticsearch/Cl0lV4AMszo/discussion](https://groups.google.com/d/topic/elasticsearch/Cl0lV4AMszo/discussion)  
I'm running on AWS and after replacing one node that was running out of  
space, I can't reproduce the error anymore.

On Thursday, November 15, 2012 11:08:09 AM UTC+2, Eric Kazaki wrote:

> Hi
> 
> I'm testing highlighting and getting very strange errors on a 3 nodes  
> cluster. Without highlighting the query runs fine and I get all the  
> documents I want without failures. When I add highlighting, the same query  
> returns with failures and this number is fluctuating even though the  
> documents haven't changed.
> 
> The highlighting part of the query is:  
> "highlight": {  
> "number\_of\_fragments": 10,  
> "fragment\_size": 10,  
> "pre\_tags": [""],  
> "post\_tags": [""],  
> "fields": {  
> "title": {"number\_of\_fragments": 0},  
> "body": {"number\_of\_fragments": 1}  
> }  
> }
> 
> "body" isn't a stored field so it's being fetched from "\_source" but  
> "title" is stored.
> 
> Running the query with highlighting causes this:
> 
> - failed: 1
> - failures: [
> - {
> - status: 500
> - reason: RemoteTransportException[Failed to deserialize  
> response of type [org.elasticsearch.search.fetch.FetchSearchResult]];  
> nested: TransportSerializationException[Failed to deserialize response of  
> type [org.elasticsearch.search.fetch.FetchSearchResult]]; nested:  
> IndexOutOfBoundsException[Invalid combined index of 200554, maximum is  
> 855];  
> }  
> ]
> 
> - 
> 
> Repeating the same query:
> 
> - failed: 2
> - failures: [
> - {
> - status: 500
> - reason: RemoteTransportException[Failed to deserialize  
> response of type [org.elasticsearch.search.fetch.FetchSearchResult]];  
> nested: TransportSerializationException[Failed to deserialize response of  
> type [org.elasticsearch.search.fetch.FetchSearchResult]]; nested:  
> IndexOutOfBoundsException[Invalid combined index of 199753, maximum is  
> 819];  
> }
> 
> - {
> - status: 500
> - reason: RemoteTransportException[Failed to deserialize  
> response of type [org.elasticsearch.search.fetch.FetchSearchResult]];  
> nested: TransportSerializationException[Failed to deserialize response of  
> type [org.elasticsearch.search.fetch.FetchSearchResult]]; nested:  
> IndexOutOfBoundsException[Invalid combined index of 200584, maximum is  
> 885];  
> }  
> ]
> 
> It's the same set of documents that are failing but I can't guess why!

--

---

<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:03am UTC](https://discuss.elastic.co/t/highlighting-inconsistent-behaviour/9724/8 "2017-07-06T03:03:43Z")

</div>


