# Heisenbug with Percolator

**URL:** <https://discuss.elastic.co/t/heisenbug-with-percolator/17400>\
**Category:** Elasticsearch\
**Created:** [May 7, 2014, 8:45pm UTC](https://discuss.elastic.co/t/heisenbug-with-percolator/17400 "2014-05-07T20:45:15Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Adam\_Georgiou](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/adam_georgiou/32/1409_2.png) [@Adam\_Georgiou](https://discuss.elastic.co/u/Adam_Georgiou)\
**Post date:** [May 7, 2014, 8:45pm UTC](https://discuss.elastic.co/t/heisenbug-with-percolator/17400/1 "2014-05-07T20:45:15Z")

</div>

_Disclaimer/Naivety Hedge_

_I'm not really sure how I'd research the history of this issue, or if it  
is in fact an issue or ignorance on my part, but it's nature is elusive as  
far as I can tell and so I'm elaborating here..._

_Description_

I have a query in my percolator index that I expect to match a given  
document.  
I percolate the document and the query is _not_ returned.  
I retrieve the query, via a get request; and then dump the body of the  
query into a file.  
I then index the contents of that file, without modifying it, into the same  
index's '.percolator' type, with a different id.  
(In other words, I've re-indexed the afflicted query without modifying it.)  
Re-percolating the same document now returns the newly indexed query, while  
still excluding the original identical query.

The only thing I can think of is that, perhaps somehow the mapping for  
.percolator was different at the time of indexing the original query, and  
thus there's something different stored in lucene for that query compared  
to what's stored for the new query. But I don't have a good enough  
understanding of how mappings and storage works for the percolator, and as  
far as I've read this isn't commented on in the documentation. Is the above  
scenario possible?

_Metadata_

- elasticsearch version 1.1.0
- 2 nodes, 1 shard, 0 replicas (it's testing environment)
- // Query  
{  
"news\_id": "0000000075-nid",  
"query": {  
"filtered": {  
"filter": {  
"term": {  
"product": "some\_product"  
}  
},  
"query": {  
"multi\_match": {  
"fields": [  
"random field", "random\_field\_2", "random\_field\_3"  
],  
"query": "gasoline"  
}  
}  
}  
}  
}
- The document percolated includes the word "gasoline".

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/44a1e697-02ee-42fa-b715-14d832a3cd8c%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/44a1e697-02ee-42fa-b715-14d832a3cd8c%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![mvg](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mvg/32/98890_2.png) [@mvg](https://discuss.elastic.co/u/mvg)\
**Post date:** [May 9, 2014, 10:16am UTC](https://discuss.elastic.co/t/heisenbug-with-percolator/17400/2 "2014-05-09T10:16:14Z")

</div>

Hi,

Can you also share the document being percolated? I would expect the query  
to match if gasoline occurs in it and 'product' is equal to 'some\_product'.

You may have ran into a big regarding to the percolator and mappings:

> <https://github.com/elastic/elasticsearch/pull/5776>
>
> If the during percolating a new field was introduced in the local mapping servic…e, then those changes should be updated in cluster state of the master as well.

That has been fixed in 1.1.1, maybe you can try if this issue also occurs  
with ES 1.1.1.

Martijn

On 8 May 2014 03:45, Adam Georgiou [apg552@gmail.com](mailto:apg552@gmail.com) wrote:

> _Disclaimer/Naivety Hedge_
> 
> _I'm not really sure how I'd research the history of this issue, or if  
> it is in fact an issue or ignorance on my part, but it's nature  
> is elusive as far as I can tell and so I'm elaborating here..._
> 
> _Description_
> 
> I have a query in my percolator index that I expect to match a given  
> document.  
> I percolate the document and the query is _not_ returned.  
> I retrieve the query, via a get request; and then dump the body of the  
> query into a file.  
> I then index the contents of that file, without modifying it, into the  
> same index's '.percolator' type, with a different id.  
> (In other words, I've re-indexed the afflicted query without modifying it.)  
> Re-percolating the same document now returns the newly indexed query,  
> while still excluding the original identical query.
> 
> The only thing I can think of is that, perhaps somehow the mapping for  
> .percolator was different at the time of indexing the original query, and  
> thus there's something different stored in lucene for that query compared  
> to what's stored for the new query. But I don't have a good enough  
> understanding of how mappings and storage works for the percolator, and as  
> far as I've read this isn't commented on in the documentation. Is the above  
> scenario possible?
> 
> _Metadata_
> 
> - elasticsearch version 1.1.0
> - 2 nodes, 1 shard, 0 replicas (it's testing environment)
> - // Query  
> {  
> "news\_id": "0000000075-nid",  
> "query": {  
> "filtered": {  
> "filter": {  
> "term": {  
> "product": "some\_product"  
> }  
> },  
> "query": {  
> "multi\_match": {  
> "fields": [  
> "random field", "random\_field\_2", "random\_field\_3"  
> ],  
> "query": "gasoline"  
> }  
> }  
> }  
> }  
> }
> - The document percolated includes the word "gasoline".
> 
> --  
> You received this message because you are subscribed to the Google Groups  
> "elasticsearch" group.  
> To unsubscribe from this group and stop receiving emails from it, send an  
> email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
> To view this discussion on the web visit  
> [https://groups.google.com/d/msgid/elasticsearch/44a1e697-02ee-42fa-b715-14d832a3cd8c%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/44a1e697-02ee-42fa-b715-14d832a3cd8c%40googlegroups.com)[https://groups.google.com/d/msgid/elasticsearch/44a1e697-02ee-42fa-b715-14d832a3cd8c%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/44a1e697-02ee-42fa-b715-14d832a3cd8c%40googlegroups.com?utm_medium=email&utm_source=footer)  
> .  
> For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

--  
Met vriendelijke groet,

Martijn van Groningen

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/CA%2BA76TzKytjda-RYD3ixXy1d5-7znCH0ssTmoOTD7iSsExjvVg%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CA%2BA76TzKytjda-RYD3ixXy1d5-7znCH0ssTmoOTD7iSsExjvVg%40mail.gmail.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![Adam\_Georgiou](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/adam_georgiou/32/1409_2.png) [@Adam\_Georgiou](https://discuss.elastic.co/u/Adam_Georgiou)\
**Post date:** [May 9, 2014, 2:22pm UTC](https://discuss.elastic.co/t/heisenbug-with-percolator/17400/3 "2014-05-09T14:22:53Z")

</div>

{  
"doc": {  
"random field": [  
"\n\nMay 04--The 49ers employ an All-Pro linebacker whose  
college career appeared to foreshadow off-the-field trouble in the NFL. He  
was involved in an on-campus fight, suspended by his head coach and  
admitted to gasolining"  
],  
"product": "KRT"  
}  
}

The above is similar to the document I was using, modifying random\_field's  
value by hand, and with some extra key:value pairs removed. (Note the  
implied stemming here -- the identical query referred to above matched, as  
stemming was applied correctly.)

On Friday, May 9, 2014 6:16:14 AM UTC-4, Martijn v Groningen wrote:

> Hi,
> 
> Can you also share the document being percolated? I would expect the query  
> to match if gasoline occurs in it and 'product' is equal to 'some\_product'.
> 
> You may have ran into a big regarding to the percolator and mappings:  
> [Propagate percolate mapping changes to cluster state by martijnvg · Pull Request #5776 · elastic/elasticsearch · GitHub](https://github.com/elasticsearch/elasticsearch/pull/5776)  
> That has been fixed in 1.1.1, maybe you can try if this issue also occurs  
> with ES 1.1.1.
> 
> Martijn
> 
> On 8 May 2014 03:45, Adam Georgiou \<[apg...@gmail.com](mailto:apg...@gmail.com) \<javascript:\>\> wrote:
> 
> > _Disclaimer/Naivety Hedge_
> > 
> > _I'm not really sure how I'd research the history of this issue, or if  
> > it is in fact an issue or ignorance on my part, but it's nature  
> > is elusive as far as I can tell and so I'm elaborating here..._
> > 
> > _Description_
> > 
> > I have a query in my percolator index that I expect to match a given  
> > document.  
> > I percolate the document and the query is _not_ returned.  
> > I retrieve the query, via a get request; and then dump the body of the  
> > query into a file.  
> > I then index the contents of that file, without modifying it, into the  
> > same index's '.percolator' type, with a different id.  
> > (In other words, I've re-indexed the afflicted query without modifying  
> > it.)  
> > Re-percolating the same document now returns the newly indexed query,  
> > while still excluding the original identical query.
> > 
> > The only thing I can think of is that, perhaps somehow the mapping for  
> > .percolator was different at the time of indexing the original query, and  
> > thus there's something different stored in lucene for that query compared  
> > to what's stored for the new query. But I don't have a good enough  
> > understanding of how mappings and storage works for the percolator, and as  
> > far as I've read this isn't commented on in the documentation. Is the above  
> > scenario possible?
> > 
> > _Metadata_
> > 
> > - elasticsearch version 1.1.0
> > - 2 nodes, 1 shard, 0 replicas (it's testing environment)
> > - // Query  
> > {  
> > "news\_id": "0000000075-nid",  
> > "query": {  
> > "filtered": {  
> > "filter": {  
> > "term": {  
> > "product": "some\_product"  
> > }  
> > },  
> > "query": {  
> > "multi\_match": {  
> > "fields": [  
> > "random field", "random\_field\_2", "random\_field\_3"  
> > ],  
> > "query": "gasoline"  
> > }  
> > }  
> > }  
> > }  
> > }
> > - The document percolated includes the word "gasoline".
> > 
> > --  
> > You received this message because you are subscribed to the Google Groups  
> > "elasticsearch" group.  
> > To unsubscribe from this group and stop receiving emails from it, send an  
> > email to [elasticsearc...@googlegroups.com](mailto:elasticsearc...@googlegroups.com) \<javascript:\>.  
> > To view this discussion on the web visit  
> > [https://groups.google.com/d/msgid/elasticsearch/44a1e697-02ee-42fa-b715-14d832a3cd8c%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/44a1e697-02ee-42fa-b715-14d832a3cd8c%40googlegroups.com)[https://groups.google.com/d/msgid/elasticsearch/44a1e697-02ee-42fa-b715-14d832a3cd8c%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/44a1e697-02ee-42fa-b715-14d832a3cd8c%40googlegroups.com?utm_medium=email&utm_source=footer)  
> > .  
> > For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).
> 
> --  
> Met vriendelijke groet,
> 
> Martijn van Groningen

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/dc3408ec-3e26-4798-bf26-cbedf9757cf9%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/dc3408ec-3e26-4798-bf26-cbedf9757cf9%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<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:30am UTC](https://discuss.elastic.co/t/heisenbug-with-percolator/17400/4 "2017-07-06T01:30:30Z")

</div>


