Revisiting query parse (no field after start_object) errors

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Revisiting query parse (no field after start_object) errors

Jack Park-2
This query:

{
    "from": 0,
    "size": 30,
    "query": {
        "term": {
            "sbOf": "TypeType"
        }
    }
}

is giving me fits. I recently migrated from 0.90 to 1.2.2 and went through this with my node.js client, got many ideas in this forum and solved the problem. The query above works fine from node.js, but fails  (listing below) from the java client running against the same index as the node client.

I realize this is a potentially high-dimensional issue with many actors other than the query string in play. Just looking for hints.

I have tested with and without "query". No difference. 

Many thanks in advance
Jack

listing:
ERROR 2014-09-15 08:28:50,882 [main] - Failed to execute phase [query], all shards failed; shardFailures {[vIdL7fWlT1en9lKkGS8NyA][topics][2]: SearchParseException[[topics][2]: from[-1],size[-1]: Parse Failure [Failed to parse source [{"query_binary":"eyJmcm9tIjowLCJzaXplIjozMCwicXVlcnkiOnsidGVybSI6eyJzYk9mIjoiVHlwZVR5cGUifX19"}]]]; nested: QueryParsingException[[topics] [_na] query malformed, no field after start_object]; }{[vIdL7fWlT1en9lKkGS8NyA][topics][3]: SearchParseException[[topics][3]: from[-1],size[-1]: Parse Failure [Failed to parse source [{"query_binary":"eyJmcm9tIjowLCJzaXplIjozMCwicXVlcnkiOnsidGVybSI6eyJzYk9mIjoiVHlwZVR5cGUifX19"}]]]; nested: QueryParsingException[[topics] [_na] query malformed, no field after start_object]; }{[vIdL7fWlT1en9lKkGS8NyA][topics][0]: SearchParseException[[topics][0]: from[-1],size[-1]: Parse Failure [Failed to parse source [{"query_binary":"eyJmcm9tIjowLCJzaXplIjozMCwicXVlcnkiOnsidGVybSI6eyJzYk9mIjoiVHlwZVR5cGUifX19"}]]]; nested: QueryParsingException[[topics] [_na] query malformed, no field after start_object]; }{[vIdL7fWlT1en9lKkGS8NyA][topics][1]: SearchParseException[[topics][1]: from[-1],size[-1]: Parse Failure [Failed to parse source [{"query_binary":"eyJmcm9tIjowLCJzaXplIjozMCwicXVlcnkiOnsidGVybSI6eyJzYk9mIjoiVHlwZVR5cGUifX19"}]]]; nested: QueryParsingException[[topics] [_na] query malformed, no field after start_object]; }{[vIdL7fWlT1en9lKkGS8NyA][topics][4]: SearchParseException[[topics][4]: from[-1],size[-1]: Parse Failure [Failed to parse source [{"query_binary":"eyJmcm9tIjowLCJzaXplIjozMCwicXVlcnkiOnsidGVybSI6eyJzYk9mIjoiVHlwZVR5cGUifX19"}]]]; nested: QueryParsingException[[topics] [_na] query malformed, no field after start_object]; }
org.elasticsearch.action.search.SearchPhaseExecutionException: Failed to execute phase [query], all shards failed; shardFailures {[vIdL7fWlT1en9lKkGS8NyA][topics][2]: SearchParseException[[topics][2]: from[-1],size[-1]: Parse Failure [Failed to parse source [{"query_binary":"eyJmcm9tIjowLCJzaXplIjozMCwicXVlcnkiOnsidGVybSI6eyJzYk9mIjoiVHlwZVR5cGUifX19"}]]]; nested: QueryParsingException[[topics] [_na] query malformed, no field after start_object]; }{[vIdL7fWlT1en9lKkGS8NyA][topics][3]: SearchParseException[[topics][3]: from[-1],size[-1]: Parse Failure [Failed to parse source [{"query_binary":"eyJmcm9tIjowLCJzaXplIjozMCwicXVlcnkiOnsidGVybSI6eyJzYk9mIjoiVHlwZVR5cGUifX19"}]]]; nested: QueryParsingException[[topics] [_na] query malformed, no field after start_object]; }{[vIdL7fWlT1en9lKkGS8NyA][topics][0]: SearchParseException[[topics][0]: from[-1],size[-1]: Parse Failure [Failed to parse source [{"query_binary":"eyJmcm9tIjowLCJzaXplIjozMCwicXVlcnkiOnsidGVybSI6eyJzYk9mIjoiVHlwZVR5cGUifX19"}]]]; nested: QueryParsingException[[topics] [_na] query malformed, no field after start_object]; }{[vIdL7fWlT1en9lKkGS8NyA][topics][1]: SearchParseException[[topics][1]: from[-1],size[-1]: Parse Failure [Failed to parse source [{"query_binary":"eyJmcm9tIjowLCJzaXplIjozMCwicXVlcnkiOnsidGVybSI6eyJzYk9mIjoiVHlwZVR5cGUifX19"}]]]; nested: QueryParsingException[[topics] [_na] query malformed, no field after start_object]; }{[vIdL7fWlT1en9lKkGS8NyA][topics][4]: SearchParseException[[topics][4]: from[-1],size[-1]: Parse Failure [Failed to parse source [{"query_binary":"eyJmcm9tIjowLCJzaXplIjozMCwicXVlcnkiOnsidGVybSI6eyJzYk9mIjoiVHlwZVR5cGUifX19"}]]]; nested: QueryParsingException[[topics] [_na] query malformed, no field after start_object]; }
at org.elasticsearch.action.search.type.TransportSearchTypeAction$BaseAsyncAction.onFirstPhaseResult(TransportSearchTypeAction.java:233)

--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/CAH6s0fzRqQpTCc83N_vdwT15eAS-%2BH6OzUQqCWR2FWZsgnsNKQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Revisiting query parse (no field after start_object) errors

Jack Park-2
Updating my query.

I ran the same test just using this query:
{
  "term" : {
    "sbOf" : "TypeType"
  }
}

with absolutely no failure.

But, if I put from and size in front of it, with or without "query", there is a failure.
So, this query does run, though from and size are meaningless
{
    "term": {
        "sbOf": "TypeType"
    },
    "from": 0,
    "size": 30
}

The final solution appears to be to use the SearchBuilder to set from and size, code like this:

SearchRequestBuilder builder = prepareSearch(index)
               .setSearchType(SearchType.QUERY_THEN_FETCH)
               .setTypes(types)
               .setQuery(queryString)
               .setFrom(start);
               if (count > -1) 
                builder.setSize(count);

Interesting thought:
With the NodeJS client, folding from and size into the query string works just fine; in the Java client, it fails rather spectacularly.

No clue why, but it's bound to be something in my code...


On Mon, Sep 15, 2014 at 8:45 AM, Jack Park <[hidden email]> wrote:
This query:

{
    "from": 0,
    "size": 30,
    "query": {
        "term": {
            "sbOf": "TypeType"
        }
    }
}

is giving me fits. I recently migrated from 0.90 to 1.2.2 and went through this with my node.js client, got many ideas in this forum and solved the problem. The query above works fine from node.js, but fails  (listing below) from the java client running against the same index as the node client.

I realize this is a potentially high-dimensional issue with many actors other than the query string in play. Just looking for hints.

I have tested with and without "query". No difference. 

Many thanks in advance
Jack

listing:
ERROR 2014-09-15 08:28:50,882 [main] - Failed to execute phase [query], all shards failed; shardFailures {[vIdL7fWlT1en9lKkGS8NyA][topics][2]: SearchParseException[[topics][2]: from[-1],size[-1]: Parse Failure [Failed to parse source [{"query_binary":"eyJmcm9tIjowLCJzaXplIjozMCwicXVlcnkiOnsidGVybSI6eyJzYk9mIjoiVHlwZVR5cGUifX19"}]]]; nested: QueryParsingException[[topics] [_na] query malformed, no field after start_object]; }{[vIdL7fWlT1en9lKkGS8NyA][topics][3]: SearchParseException[[topics][3]: from[-1],size[-1]: Parse Failure [Failed to parse source [{"query_binary":"eyJmcm9tIjowLCJzaXplIjozMCwicXVlcnkiOnsidGVybSI6eyJzYk9mIjoiVHlwZVR5cGUifX19"}]]]; nested: QueryParsingException[[topics] [_na] query malformed, no field after start_object]; }{[vIdL7fWlT1en9lKkGS8NyA][topics][0]: SearchParseException[[topics][0]: from[-1],size[-1]: Parse Failure [Failed to parse source [{"query_binary":"eyJmcm9tIjowLCJzaXplIjozMCwicXVlcnkiOnsidGVybSI6eyJzYk9mIjoiVHlwZVR5cGUifX19"}]]]; nested: QueryParsingException[[topics] [_na] query malformed, no field after start_object]; }{[vIdL7fWlT1en9lKkGS8NyA][topics][1]: SearchParseException[[topics][1]: from[-1],size[-1]: Parse Failure [Failed to parse source [{"query_binary":"eyJmcm9tIjowLCJzaXplIjozMCwicXVlcnkiOnsidGVybSI6eyJzYk9mIjoiVHlwZVR5cGUifX19"}]]]; nested: QueryParsingException[[topics] [_na] query malformed, no field after start_object]; }{[vIdL7fWlT1en9lKkGS8NyA][topics][4]: SearchParseException[[topics][4]: from[-1],size[-1]: Parse Failure [Failed to parse source [{"query_binary":"eyJmcm9tIjowLCJzaXplIjozMCwicXVlcnkiOnsidGVybSI6eyJzYk9mIjoiVHlwZVR5cGUifX19"}]]]; nested: QueryParsingException[[topics] [_na] query malformed, no field after start_object]; }
org.elasticsearch.action.search.SearchPhaseExecutionException: Failed to execute phase [query], all shards failed; shardFailures {[vIdL7fWlT1en9lKkGS8NyA][topics][2]: SearchParseException[[topics][2]: from[-1],size[-1]: Parse Failure [Failed to parse source [{"query_binary":"eyJmcm9tIjowLCJzaXplIjozMCwicXVlcnkiOnsidGVybSI6eyJzYk9mIjoiVHlwZVR5cGUifX19"}]]]; nested: QueryParsingException[[topics] [_na] query malformed, no field after start_object]; }{[vIdL7fWlT1en9lKkGS8NyA][topics][3]: SearchParseException[[topics][3]: from[-1],size[-1]: Parse Failure [Failed to parse source [{"query_binary":"eyJmcm9tIjowLCJzaXplIjozMCwicXVlcnkiOnsidGVybSI6eyJzYk9mIjoiVHlwZVR5cGUifX19"}]]]; nested: QueryParsingException[[topics] [_na] query malformed, no field after start_object]; }{[vIdL7fWlT1en9lKkGS8NyA][topics][0]: SearchParseException[[topics][0]: from[-1],size[-1]: Parse Failure [Failed to parse source [{"query_binary":"eyJmcm9tIjowLCJzaXplIjozMCwicXVlcnkiOnsidGVybSI6eyJzYk9mIjoiVHlwZVR5cGUifX19"}]]]; nested: QueryParsingException[[topics] [_na] query malformed, no field after start_object]; }{[vIdL7fWlT1en9lKkGS8NyA][topics][1]: SearchParseException[[topics][1]: from[-1],size[-1]: Parse Failure [Failed to parse source [{"query_binary":"eyJmcm9tIjowLCJzaXplIjozMCwicXVlcnkiOnsidGVybSI6eyJzYk9mIjoiVHlwZVR5cGUifX19"}]]]; nested: QueryParsingException[[topics] [_na] query malformed, no field after start_object]; }{[vIdL7fWlT1en9lKkGS8NyA][topics][4]: SearchParseException[[topics][4]: from[-1],size[-1]: Parse Failure [Failed to parse source [{"query_binary":"eyJmcm9tIjowLCJzaXplIjozMCwicXVlcnkiOnsidGVybSI6eyJzYk9mIjoiVHlwZVR5cGUifX19"}]]]; nested: QueryParsingException[[topics] [_na] query malformed, no field after start_object]; }
at org.elasticsearch.action.search.type.TransportSearchTypeAction$BaseAsyncAction.onFirstPhaseResult(TransportSearchTypeAction.java:233)


--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/CAH6s0fwZk2xso0F%3Din7EkdzR%2B81i%2BKeDhytyFw8pghfVo5Hgaw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.