Terms filter with values to match in uppercase is not possible?

Hi!,
I have a document like this:
{
"type": "film",
"countries": ["US", "ES"]
}

And i insert it in elasticsearch, then i do the follow search:

GET _search?search_type=dfs_query_and_fetch
{
"query": {
"filtered": {
"query": {
"term": {"type": "film"}
},
"filter": {
"query": {
"terms": {
"countries": [
"US",
"ES"
]
}
}
}
}
}
}

But I get a result without the document...But if I change the "terms"
filter to...

....
"terms": {
"countries": [
"us",
"es"
]
}
....

Then I get a result with the document! So, this is a bug or is a desired
behavior?

Thanks!

Cheers,
Emilio

--
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/6f6dd695-5703-4d8a-a8a9-2b095bd8389a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

You are using the standard analyzer which is using a lowercase filter.

Jörg

On Sat, Nov 22, 2014 at 11:30 PM, Emilio García-Pumarino Álvarez <
emili.tfe@gmail.com> wrote:

Hi!,
I have a document like this:
{
"type": "film",
"countries": ["US", "ES"]
}

And i insert it in elasticsearch, then i do the follow search:

GET _search?search_type=dfs_query_and_fetch
{
"query": {
"filtered": {
"query": {
"term": {"type": "film"}
},
"filter": {
"query": {
"terms": {
"countries": [
"US",
"ES"
]
}
}
}
}
}
}

But I get a result without the document...But if I change the "terms"
filter to...

....
"terms": {
"countries": [
"us",
"es"
]
}
....

Then I get a result with the document! So, this is a bug or is a desired
behavior?

Thanks!

Cheers,
Emilio

--
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/6f6dd695-5703-4d8a-a8a9-2b095bd8389a%40googlegroups.com
https://groups.google.com/d/msgid/elasticsearch/6f6dd695-5703-4d8a-a8a9-2b095bd8389a%40googlegroups.com?utm_medium=email&utm_source=footer
.
For more options, visit https://groups.google.com/d/optout.

--
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/CAKdsXoE9c0bSXL711hkKk-v6sNwrOWW-P0reQBC-KgRBdyO57g%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Thanks!

El sábado, 22 de noviembre de 2014 22:45:27 UTC, Jörg Prante escribió:

You are using the standard analyzer which is using a lowercase filter.

Jörg

On Sat, Nov 22, 2014 at 11:30 PM, Emilio García-Pumarino Álvarez <
emil...@gmail.com <javascript:>> wrote:

Hi!,
I have a document like this:
{
"type": "film",
"countries": ["US", "ES"]
}

And i insert it in elasticsearch, then i do the follow search:

GET _search?search_type=dfs_query_and_fetch
{
"query": {
"filtered": {
"query": {
"term": {"type": "film"}
},
"filter": {
"query": {
"terms": {
"countries": [
"US",
"ES"
]
}
}
}
}
}
}

But I get a result without the document...But if I change the "terms"
filter to...

....
"terms": {
"countries": [
"us",
"es"
]
}
....

Then I get a result with the document! So, this is a bug or is a desired
behavior?

Thanks!

Cheers,
Emilio

--
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 <javascript:>.
To view this discussion on the web visit
https://groups.google.com/d/msgid/elasticsearch/6f6dd695-5703-4d8a-a8a9-2b095bd8389a%40googlegroups.com
https://groups.google.com/d/msgid/elasticsearch/6f6dd695-5703-4d8a-a8a9-2b095bd8389a%40googlegroups.com?utm_medium=email&utm_source=footer
.
For more options, visit https://groups.google.com/d/optout.

--
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/b333024a-e547-4a04-8859-c717703a7562%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.