Regexp query flags documentation bug?

Hello,

I'm encountering some unexpected behavior when using the regexp query. I
get zero results when I use the syntax given in the documentationhttp://www.elasticsearch.org/guide/en/elasticsearch/reference/current/query-dsl-regexp-query.html
:

{
"regexp":{
"name.first": "s.*y",
"flags" : "INTERSECTION|COMPLEMENT|EMPTY"
}
}

However, if I change the syntax to the following, results are returned:

{
"regexp":{
"name.first":{
"value" : "s.*y",
"flags" : "INTERSECTION|COMPLEMENT|EMPTY"
}
}
}

I tested this on 0.90.5, 1.0.0, and 1.1.0 with the same results. Can anyone
confirm?

Jamil

--
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/52ad8946-2663-4533-a392-ff52155e8ec3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

I should add that this only occurs within a filtered query, e.g.

{
"query": {
"filtered": {
"filter": {
"regexp": {
"name.first": "s.*y",
"flags": "ALL"
}
}
}
}
}

On Monday, March 31, 2014 2:03:58 PM UTC-7, Jamil Bou Kheir wrote:

Hello,

I'm encountering some unexpected behavior when using the regexp query. I
get zero results when I use the syntax given in the documentationhttp://www.elasticsearch.org/guide/en/elasticsearch/reference/current/query-dsl-regexp-query.html
:

{
"regexp":{
"name.first": "s.*y",
"flags" : "INTERSECTION|COMPLEMENT|EMPTY"
}
}

However, if I change the syntax to the following, results are returned:

{
"regexp":{
"name.first":{
"value" : "s.*y",
"flags" : "INTERSECTION|COMPLEMENT|EMPTY"
}
}
}

I tested this on 0.90.5, 1.0.0, and 1.1.0 with the same results. Can
anyone confirm?

Jamil

--
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/728f4123-6d10-4e2f-82c7-8992c3d3d1c8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Thanks, that is an error in the docs and submitted a correction already.
Your second syntax is the correct one.

--
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/777af59c-78dd-42c1-877c-7213dc3b6163%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.