URI search not behaving the same as in Query DSL

Hi all,

I am testing using wildcards in field names. I have the following URI
search:

_search?q=p.*:pair&explain

It returns me results (in the browser).

However, when I express this query in Query DSL like this, then no results
get returned:

{
"query" : {
"query_string" : {
"fields" : ["p.*"],
"query" : "pair"
}
}
}

Is this a bug or do I have the wrong translation of the query in Query DSL?

Thanks!

/JZ

--
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/d0236cbc-17e2-4f14-83b7-da5941351d48%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

You have to enable "analyze_wildcard: true"

Jörg

On Wed, Dec 3, 2014 at 4:58 PM, drjz juntezhang@gmail.com wrote:

Hi all,

I am testing using wildcards in field names. I have the following URI
search:

_search?q=p.*:pair&explain

It returns me results (in the browser).

However, when I express this query in Query DSL like this, then no results
get returned:

{
"query" : {
"query_string" : {
"fields" : ["p.*"],
"query" : "pair"
}
}
}

Is this a bug or do I have the wrong translation of the query in Query DSL?

Thanks!

/JZ

--
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/d0236cbc-17e2-4f14-83b7-da5941351d48%40googlegroups.com
https://groups.google.com/d/msgid/elasticsearch/d0236cbc-17e2-4f14-83b7-da5941351d48%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/CAKdsXoHhFgbyqH9grwoa%3DyST5NS%3DTa208Tg8kSf_zJ8sYYtU8w%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Adding analyze_wildcard does not have an effect.

For example, the DSL query below does not return any results, while as a
URI query it does return me the set of matching documents.

{
"query" : {
"query_string" : {
"analyze_wildcard" : true,
"fields" : ["p.*"],
"query" : "london"
}
}
}

Any more ideas?

Thanks!

/JZ

On Thursday, December 4, 2014 9:59:35 AM UTC+1, Jörg Prante wrote:

You have to enable "analyze_wildcard: true"

Jörg

On Wed, Dec 3, 2014 at 4:58 PM, drjz <junte...@gmail.com <javascript:>>
wrote:

Hi all,

I am testing using wildcards in field names. I have the following URI
search:

_search?q=p.*:pair&explain

It returns me results (in the browser).

However, when I express this query in Query DSL like this, then no
results get returned:

{
"query" : {
"query_string" : {
"fields" : ["p.*"],
"query" : "pair"
}
}
}

Is this a bug or do I have the wrong translation of the query in Query
DSL?

Thanks!

/JZ

--
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/d0236cbc-17e2-4f14-83b7-da5941351d48%40googlegroups.com
https://groups.google.com/d/msgid/elasticsearch/d0236cbc-17e2-4f14-83b7-da5941351d48%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/a3306b15-5c6f-4ee1-b9be-fd89b5118af1%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.