Percolator filtering not working?

Percolation works fine, as long as I don't 'filter' the percolators. Please see below for the scenario. What am I doing wrong?

percolator mapping:

{
"activities-20150107-162224": {
"mappings": {
".percolator": {
"_id": {
"index": "not_analyzed"
},
"properties": {
"doc_type": {
"type": "string"
},
"query": {
"type": "object",
"enabled": false
}
}
}
}
}
}

percolator query doc:

{
"_index": "activities-20150107-162224",
"_type": ".percolator",
"_id": "tagrule-1",
"_version": 2,
"found": true,
"_source": {
"query": {
"query_string": {
"fields": [
"name",
"description"
],
"query": "hockey"
}
},
"doc_type": "activity"
}
}

percolate request that works fine:

GET /activities/activity/_percolate?percolate_format=ids
{
"doc": {
"name": "hockey"
}
}

filtered percolate request that does NOT work.

GET /activities/activity/_percolate?percolate_format=ids
{
"doc": {
"name": "hockey"
},
"query": {
"filtered": {
"query": {"match_all": {}},
"filter": {
"term": {
"doc_type": "activity"
}
}
}
}
}

This also does not work:

GET /activities/activity/_percolate?percolate_format=ids
{
"doc": {
"name": "hockey"
},
"filter": {
"term": {
"doc_type": "activity"
}
}
}

I have done a /_refresh on the index. ES version is 1.4.2.

--
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/9746982d-cdac-474e-8b0d-40996bbb3c3e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Nobody knows anything about percolators?

On Friday, January 30, 2015 at 2:32:33 PM UTC-8, James Addison wrote:

Percolation works fine, as long as I don't 'filter' the percolators. Please see below for the scenario. What am I doing wrong?

percolator mapping:

{
"activities-20150107-162224": {
"mappings": {
".percolator": {
"_id": {
"index": "not_analyzed"
},
"properties": {
"doc_type": {
"type": "string"
},
"query": {
"type": "object",
"enabled": false
}
}
}
}
}
}

percolator query doc:

{
"_index": "activities-20150107-162224",
"_type": ".percolator",
"_id": "tagrule-1",
"_version": 2,
"found": true,
"_source": {
"query": {
"query_string": {
"fields": [
"name",
"description"
],
"query": "hockey"
}
},
"doc_type": "activity"
}
}

percolate request that works fine:

GET /activities/activity/_percolate?percolate_format=ids
{
"doc": {
"name": "hockey"
}
}

filtered percolate request that does NOT work.

GET /activities/activity/_percolate?percolate_format=ids
{
"doc": {
"name": "hockey"
},
"query": {
"filtered": {
"query": {"match_all": {}},
"filter": {
"term": {
"doc_type": "activity"
}
}
}
}
}

This also does not work:

GET /activities/activity/_percolate?percolate_format=ids
{
"doc": {
"name": "hockey"
},
"filter": {
"term": {
"doc_type": "activity"
}
}
}

I have done a /_refresh on the index. ES version is 1.4.2.

--
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/29e62092-3023-4acc-951b-78d892cefb30%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

The index that the percolator query is in is named: '
activities-20150107-162224', but your are percolating on the activities
index. I think in the activities index there is no doc_type field defined
in the .percolator type, so that is why there are no matches. If you you
use activities* as index in the percolator call, matches should return.

On 3 February 2015 at 20:50, James Addison addi00@gmail.com wrote:

Nobody knows anything about percolators?

On Friday, January 30, 2015 at 2:32:33 PM UTC-8, James Addison wrote:

Percolation works fine, as long as I don't 'filter' the percolators. Please see below for the scenario. What am I doing wrong?

percolator mapping:

{
"activities-20150107-162224": {
"mappings": {
".percolator": {
"_id": {
"index": "not_analyzed"
},
"properties": {
"doc_type": {
"type": "string"
},
"query": {
"type": "object",
"enabled": false
}
}
}
}
}
}

percolator query doc:

{
"_index": "activities-20150107-162224",
"_type": ".percolator",
"_id": "tagrule-1",
"_version": 2,
"found": true,
"_source": {
"query": {
"query_string": {
"fields": [
"name",
"description"
],
"query": "hockey"
}
},
"doc_type": "activity"
}
}

percolate request that works fine:

GET /activities/activity/_percolate?percolate_format=ids
{
"doc": {
"name": "hockey"
}
}

filtered percolate request that does NOT work.

GET /activities/activity/_percolate?percolate_format=ids
{
"doc": {
"name": "hockey"
},
"query": {
"filtered": {
"query": {"match_all": {}},
"filter": {
"term": {
"doc_type": "activity"
}
}
}
}
}

This also does not work:

GET /activities/activity/_percolate?percolate_format=ids
{
"doc": {
"name": "hockey"
},
"filter": {
"term": {
"doc_type": "activity"
}
}
}

I have done a /_refresh on the index. ES version is 1.4.2.

--
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.
To view this discussion on the web visit
https://groups.google.com/d/msgid/elasticsearch/29e62092-3023-4acc-951b-78d892cefb30%40googlegroups.com
https://groups.google.com/d/msgid/elasticsearch/29e62092-3023-4acc-951b-78d892cefb30%40googlegroups.com?utm_medium=email&utm_source=footer
.

For more options, visit 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.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/CA%2BA76TwiwrKG5mCrpE%3DCzoYhYun2NwmgT5kZBrv40pbsaHoMkg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Hi Martijn,

Thanks for the reply - 'activities' is an alias to '
activities-20150107-162224', and as I mentioned, percolation without
percolator filtering works fine - so this should mean that the percolator
is in the index and is accessible via the alias.

So again, I'm not sure why percolator filtering isn't working - as I've
said, I assume I'm misunderstanding/doing something wrong, but I can't
figure out just what.

James

On Tuesday, February 3, 2015 at 10:43:14 PM UTC-8, Martijn v Groningen
wrote:

The index that the percolator query is in is named: '
activities-20150107-162224', but your are percolating on the activities
index. I think in the activities index there is no doc_type field defined
in the .percolator type, so that is why there are no matches. If you you
use activities* as index in the percolator call, matches should return.

On 3 February 2015 at 20:50, James Addison <add...@gmail.com <javascript:>

wrote:

Nobody knows anything about percolators?

On Friday, January 30, 2015 at 2:32:33 PM UTC-8, James Addison wrote:

Percolation works fine, as long as I don't 'filter' the percolators. Please see below for the scenario. What am I doing wrong?

percolator mapping:

{
"activities-20150107-162224": {
"mappings": {
".percolator": {
"_id": {
"index": "not_analyzed"
},
"properties": {
"doc_type": {
"type": "string"
},
"query": {
"type": "object",
"enabled": false
}
}
}
}
}
}

percolator query doc:

{
"_index": "activities-20150107-162224",
"_type": ".percolator",
"_id": "tagrule-1",
"_version": 2,
"found": true,
"_source": {
"query": {
"query_string": {
"fields": [
"name",
"description"
],
"query": "hockey"
}
},
"doc_type": "activity"
}
}

percolate request that works fine:

GET /activities/activity/_percolate?percolate_format=ids
{
"doc": {
"name": "hockey"
}
}

filtered percolate request that does NOT work.

GET /activities/activity/_percolate?percolate_format=ids
{
"doc": {
"name": "hockey"
},
"query": {
"filtered": {
"query": {"match_all": {}},
"filter": {
"term": {
"doc_type": "activity"
}
}
}
}
}

This also does not work:

GET /activities/activity/_percolate?percolate_format=ids
{
"doc": {
"name": "hockey"
},
"filter": {
"term": {
"doc_type": "activity"
}
}
}

I have done a /_refresh on the index. ES version is 1.4.2.

--
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/5f4a6319-ed02-4673-8b4f-b7d2966a248c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Ah! https://github.com/elasticsearch/elasticsearch/issues/6241, your very
own bug submission, Martijn! I suspect this is the culprit - it's been an
open issue for some time. At least I know it's not my fault... at the
moment. :slight_smile:

James

On Wednesday, February 4, 2015 at 9:19:11 AM UTC-8, James Addison wrote:

Hi Martijn,

Thanks for the reply - 'activities' is an alias to '
activities-20150107-162224', and as I mentioned, percolation without
percolator filtering works fine - so this should mean that the percolator
is in the index and is accessible via the alias.

So again, I'm not sure why percolator filtering isn't working - as I've
said, I assume I'm misunderstanding/doing something wrong, but I can't
figure out just what.

James

On Tuesday, February 3, 2015 at 10:43:14 PM UTC-8, Martijn v Groningen
wrote:

The index that the percolator query is in is named: '
activities-20150107-162224', but your are percolating on the
activities index. I think in the activities index there is no doc_type
field defined in the .percolator type, so that is why there are no
matches. If you you use activities* as index in the percolator call,
matches should return.

On 3 February 2015 at 20:50, James Addison add...@gmail.com wrote:

Nobody knows anything about percolators?

On Friday, January 30, 2015 at 2:32:33 PM UTC-8, James Addison wrote:

Percolation works fine, as long as I don't 'filter' the percolators. Please see below for the scenario. What am I doing wrong?

percolator mapping:

{
"activities-20150107-162224": {
"mappings": {
".percolator": {
"_id": {
"index": "not_analyzed"
},
"properties": {
"doc_type": {
"type": "string"
},
"query": {
"type": "object",
"enabled": false
}
}
}
}
}
}

percolator query doc:

{
"_index": "activities-20150107-162224",
"_type": ".percolator",
"_id": "tagrule-1",
"_version": 2,
"found": true,
"_source": {
"query": {
"query_string": {
"fields": [
"name",
"description"
],
"query": "hockey"
}
},
"doc_type": "activity"
}
}

percolate request that works fine:

GET /activities/activity/_percolate?percolate_format=ids
{
"doc": {
"name": "hockey"
}
}

filtered percolate request that does NOT work.

GET /activities/activity/_percolate?percolate_format=ids
{
"doc": {
"name": "hockey"
},
"query": {
"filtered": {
"query": {"match_all": {}},
"filter": {
"term": {
"doc_type": "activity"
}
}
}
}
}

This also does not work:

GET /activities/activity/_percolate?percolate_format=ids
{
"doc": {
"name": "hockey"
},
"filter": {
"term": {
"doc_type": "activity"
}
}
}

I have done a /_refresh on the index. ES version is 1.4.2.

--
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/44cf7fef-4daa-4086-b327-545af7e689bc%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

This issue is more about the fact that a filter associated with an alias
aren't getting applied, which is different than the issue you're
experiencing (your filter on the percolate request doesn't match with any
percolator query).

Can you try to run:
GET /activities/.percolator/_search
{
"query": {
"term": {
"doc_type" : "activity"
}
}
}

This should return the percolator query that should match with your
percolate request.

And yes, this issue is open for a while already!

On 4 February 2015 at 18:22, James Addison addi00@gmail.com wrote:

Ah! https://github.com/elasticsearch/elasticsearch/issues/6241, your very
own bug submission, Martijn! I suspect this is the culprit - it's been an
open issue for some time. At least I know it's not my fault... at the
moment. :slight_smile:

James

On Wednesday, February 4, 2015 at 9:19:11 AM UTC-8, James Addison wrote:

Hi Martijn,

Thanks for the reply - 'activities' is an alias to '
activities-20150107-162224', and as I mentioned, percolation without
percolator filtering works fine - so this should mean that the percolator
is in the index and is accessible via the alias.

So again, I'm not sure why percolator filtering isn't working - as I've
said, I assume I'm misunderstanding/doing something wrong, but I can't
figure out just what.

James

On Tuesday, February 3, 2015 at 10:43:14 PM UTC-8, Martijn v Groningen
wrote:

The index that the percolator query is in is named: '
activities-20150107-162224', but your are percolating on the
activities index. I think in the activities index there is no doc_type
field defined in the .percolator type, so that is why there are no
matches. If you you use activities* as index in the percolator call,
matches should return.

On 3 February 2015 at 20:50, James Addison add...@gmail.com wrote:

Nobody knows anything about percolators?

On Friday, January 30, 2015 at 2:32:33 PM UTC-8, James Addison wrote:

Percolation works fine, as long as I don't 'filter' the percolators. Please see below for the scenario. What am I doing wrong?

percolator mapping:

{
"activities-20150107-162224": {
"mappings": {
".percolator": {
"_id": {
"index": "not_analyzed"
},
"properties": {
"doc_type": {
"type": "string"
},
"query": {
"type": "object",
"enabled": false
}
}
}
}
}
}

percolator query doc:

{
"_index": "activities-20150107-162224",
"_type": ".percolator",
"_id": "tagrule-1",
"_version": 2,
"found": true,
"_source": {
"query": {
"query_string": {
"fields": [
"name",
"description"
],
"query": "hockey"
}
},
"doc_type": "activity"
}
}

percolate request that works fine:

GET /activities/activity/_percolate?percolate_format=ids
{
"doc": {
"name": "hockey"
}
}

filtered percolate request that does NOT work.

GET /activities/activity/_percolate?percolate_format=ids
{
"doc": {
"name": "hockey"
},
"query": {
"filtered": {
"query": {"match_all": {}},
"filter": {
"term": {
"doc_type": "activity"
}
}
}
}
}

This also does not work:

GET /activities/activity/_percolate?percolate_format=ids
{
"doc": {
"name": "hockey"
},
"filter": {
"term": {
"doc_type": "activity"
}
}
}

I have done a /_refresh on the index. ES version is 1.4.2.

--
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/CA%2BA76Tyoc%2Bp%3DaEsS8en_7%2BF16_RUqR4wettF5mM-Vya5yDNQmA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.