# Revisiting query parse (no field after start\_object) errors

**URL:** <https://discuss.elastic.co/t/revisiting-query-parse-no-field-after-start-object-errors/19791>\
**Category:** Elasticsearch\
**Created:** [September 15, 2014, 3:45pm UTC](https://discuss.elastic.co/t/revisiting-query-parse-no-field-after-start-object-errors/19791 "2014-09-15T15:45:14Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![jackpark](https://avatars.discourse-cdn.com/v4/letter/j/5f8ce5/32.png) [@jackpark](https://discuss.elastic.co/u/jackpark)\
**Post date:** [September 15, 2014, 3:45pm UTC](https://discuss.elastic.co/t/revisiting-query-parse-no-field-after-start-object-errors/19791/1 "2014-09-15T15:45:14Z")

</div>

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 [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/CAH6s0fzRqQpTCc83N\_vdwT15eAS-%2BH6OzUQqCWR2FWZsgnsNKQ%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAH6s0fzRqQpTCc83N_vdwT15eAS-%2BH6OzUQqCWR2FWZsgnsNKQ%40mail.gmail.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![jackpark](https://avatars.discourse-cdn.com/v4/letter/j/5f8ce5/32.png) [@jackpark](https://discuss.elastic.co/u/jackpark)\
**Post date:** [September 15, 2014, 6:31pm UTC](https://discuss.elastic.co/t/revisiting-query-parse-no-field-after-start-object-errors/19791/2 "2014-09-15T18:31:35Z")

</div>

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 [jackpark@topicquests.org](mailto:jackpark@topicquests.org) 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 [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/CAH6s0fwZk2xso0F%3Din7EkdzR%2B81i%2BKeDhytyFw8pghfVo5Hgaw%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAH6s0fwZk2xso0F%3Din7EkdzR%2B81i%2BKeDhytyFw8pghfVo5Hgaw%40mail.gmail.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 6, 2017, 1:02am UTC](https://discuss.elastic.co/t/revisiting-query-parse-no-field-after-start-object-errors/19791/3 "2017-07-06T01:02:10Z")

</div>


