V0.16 upgrade: search now broken

My upgrade to 0.16 has not gone smoothly, I'm afraid.

I had a set of mappings and bulk indexing operations that worked. After the upgrade, I got a few errors. So I stripped everything down to a very simple example that had no errors. Cool... But now, when I search on a document that I know should have been indexed -- in the same way I've always searched before -- I get 0 results.

I've recreated the issue here:

https://gist.github.com/27038d6bdc3f72e29b67

I am anticipating someone who sees the gist might ask: Why do you have a

{query: {"wildcard": { "_id": "*"}}}

It's a bit clunky, but I've structured it this way because my application is building query terms on the fly. This is a case where no query terms were specified -- only filter terms.

Anyway, I don't think that has anything to do with my problem. But you may have a better answer.

Thanks in advance.

Look at the very top change here:

If you want to match all, why not do:

{query: "match_all"}

Cheers,

On Sat, May 14, 2011 at 9:01 PM, searchersteve stevesuo@gmail.com wrote:

My upgrade to 0.16 has not gone smoothly, I'm afraid.

I had a set of mappings and bulk indexing operations that worked. After the
upgrade, I got a few errors. So I stripped everything down to a very simple
example that had no errors. Cool... But now, when I search on a document
that I know should have been indexed -- in the same way I've always
searched
before -- I get 0 results.

I've recreated the issue here:

ElasticSearch mapping problem · GitHub
ElasticSearch mapping problem · GitHub

I am anticipating someone who sees the gist might ask: Why do you have a

{query: {"wildcard": { "_id": "*"}}}

It's a bit clunky, but I've structured it this way because my application
is
building query terms on the fly. This is a case where no query terms were
specified -- only filter terms.

Anyway, I don't think that has anything to do with my problem. But you may
have a better answer.

Thanks in advance.

--
View this message in context:
http://elasticsearch-users.115913.n3.nabble.com/v0-16-upgrade-search-now-broken-tp2941118p2941118.html
Sent from the Elasticsearch Users mailing list archive at Nabble.com.

--

Paul Loy
paul@keteracel.com
http://uk.linkedin.com/in/paulloy

Oh boy. I feel really dumb now. I read the breaking changes, but somehow it didn't enter my brain.

It works for me now when I do this:

        "query" : {
            "match_all" : {}
        },

For completeness sake, I've created a new gist with the corrected code:

https://gist.github.com/c86ae9e406cbb0c51279

Thanks Paul!!

Look at the very top change here: http://www.elasticsearch.org/download/2011/04/23/0.16.0.html

If you want to match all, why not do:

{query: "match_all"}

Cheers,

On Sat, May 14, 2011 at 9:01 PM, searchersteve <stevesuo@gmail.com> wrote:

My upgrade to 0.16 has not gone smoothly, I'm afraid.

I had a set of mappings and bulk indexing operations that worked. After the
upgrade, I got a few errors. So I stripped everything down to a very simple
example that had no errors. Cool... But now, when I search on a document
that I know should have been indexed -- in the same way I've always
searched
before -- I get 0 results.

I've recreated the issue here:

ElasticSearch mapping problem · GitHub
ElasticSearch mapping problem · GitHub

I am anticipating someone who sees the gist might ask: Why do you have a

{query: {"wildcard": { "_id": "*"}}}

It's a bit clunky, but I've structured it this way because my application
is
building query terms on the fly. This is a case where no query terms were
specified -- only filter terms.

Anyway, I don't think that has anything to do with my problem. But you may
have a better answer.

Thanks in advance.

--
View this message in context:
http://elasticsearch-users.115913.n3.nabble.com/v0-16-upgrade-search-now-broken-tp2941118p2941118.html
Sent from the Elasticsearch Users mailing list archive at Nabble.com.

--

Paul Loy
paul@keteracel.com
http://uk.linkedin.com/in/paulloy

On Sat, 2011-05-14 at 21:12 +0100, Paul Loy wrote:

Look at the very top change here:
Elasticsearch Platform — Find real-time answers at scale | Elastic

If you want to match all, why not do:

{query: "match_all"}

Or more efficient than that, use a constant_score query:

curl -XGET 'http://localhost:9200/_search' -d '
{
"from": 0,
"size" : 50,
"query" : {
"constant_score" : {
"filter" : {
"bool" : {
"must" : [
{
"term" : {
"category" : "tweets"
}
}
]
}
}
}
}
}'

clint