Navigation Menu

Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace empty bool queries with match_all to prevent NullPointerExceptions #6722

Closed
macnibblet opened this issue Jul 4, 2014 · 1 comment · Fixed by #6723
Closed

Replace empty bool queries with match_all to prevent NullPointerExceptions #6722

macnibblet opened this issue Jul 4, 2014 · 1 comment · Fixed by #6723

Comments

@macnibblet
Copy link

I have setup a parent/child relationship where parent is optional and i handle the routing in that case. And this worked fine in 1.0.1 but when i bumped to 1.2.1 to use aggregations it stopped working.

The exception i get

[2014-07-04 07:59:30,333][INFO ][node                     ] [Tantra] version[1.2.1], pid[23438], build[6c95b75/2014-06-03T15:02:52Z]
[2014-07-04 07:59:30,334][INFO ][node                     ] [Tantra] initializing ...
[2014-07-04 07:59:30,339][INFO ][plugins                  ] [Tantra] loaded [], sites []
[2014-07-04 07:59:32,581][INFO ][script                   ] [Tantra] compiling script file [/etc/elasticsearch/scripts/activity-period.mvel]
[2014-07-04 07:59:33,016][INFO ][node                     ] [Tantra] initialized
[2014-07-04 07:59:33,016][INFO ][node                     ] [Tantra] starting ...
[2014-07-04 07:59:33,092][INFO ][transport                ] [Tantra] bound_address {inet[/0:0:0:0:0:0:0:0:9300]}, publish_address {inet[/10.0.2.15:9300]}
[2014-07-04 07:59:36,133][INFO ][cluster.service          ] [Tantra] new_master [Tantra][jUaCLA6GTyadduwbg_tTwg][packer-virtualbox][inet[/10.0.2.15:9300]], reason: zen-disco-join (elected_as_master)
[2014-07-04 07:59:36,171][INFO ][discovery                ] [Tantra] elasticsearch/jUaCLA6GTyadduwbg_tTwg
[2014-07-04 07:59:36,262][INFO ][http                     ] [Tantra] bound_address {inet[/0:0:0:0:0:0:0:0:9200]}, publish_address {inet[/10.0.2.15:9200]}
[2014-07-04 07:59:37,094][INFO ][gateway                  ] [Tantra] recovered [33] indices into cluster_state
[2014-07-04 07:59:37,116][INFO ][node                     ] [Tantra] started
[2014-07-04 07:59:45,985][DEBUG][action.search.type       ] [Tantra] [application][2], node[jUaCLA6GTyadduwbg_tTwg], [P], s[STARTED]: Failed to execute [org.elasticsearch.action.search.SearchRequest@6fa23b68] lastShard [true]
org.elasticsearch.search.SearchParseException: [application][2]: from[-1],size[-1]: Parse Failure [Failed to parse source [{
  "query": {
    "filtered": {
      "filter": {
        "bool": {
          "must": [
            {
              "has_parent": {
                "type": "clients",
                "query": {
                  "bool": {
                    "must": [],
                    "must_not": [],
                    "should": []
                  }
                },
                "filter": {
                  "bool": {
                    "must": [
                      {
                        "terms": {
                          "interests": [
                            "hello"
                          ]
                        }
                      }
                    ],
                    "must_not": [],
                    "should": []
                  }
                }
              }
            },
            {
              "geo_distance": {
                "distance": "20km",
                "coordinate": "59.85499699999999,17.6490213"
              }
            }
          ],
          "must_not": [],
          "should": []
        }
      },
      "query": []
    }
  },
  "size": 25
}
]]
    at org.elasticsearch.search.SearchService.parseSource(SearchService.java:649)
    at org.elasticsearch.search.SearchService.createContext(SearchService.java:511)
    at org.elasticsearch.search.SearchService.createAndPutContext(SearchService.java:483)
    at org.elasticsearch.search.SearchService.executeQueryPhase(SearchService.java:252)
    at org.elasticsearch.search.action.SearchServiceTransportAction$5.call(SearchServiceTransportAction.java:206)
    at org.elasticsearch.search.action.SearchServiceTransportAction$5.call(SearchServiceTransportAction.java:203)
    at org.elasticsearch.search.action.SearchServiceTransportAction$23.run(SearchServiceTransportAction.java:517)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
    at java.lang.Thread.run(Thread.java:744)
Caused by: java.lang.NullPointerException
    at org.elasticsearch.common.xcontent.XContentHelper.createParser(XContentHelper.java:46)
    at org.elasticsearch.index.query.support.XContentStructure.asQuery(XContentStructure.java:88)
    at org.elasticsearch.index.query.support.XContentStructure$InnerQuery.asQuery(XContentStructure.java:154)
    at org.elasticsearch.index.query.HasParentFilterParser.parse(HasParentFilterParser.java:115)
    at org.elasticsearch.index.query.QueryParseContext.executeFilterParser(QueryParseContext.java:283)
    at org.elasticsearch.index.query.QueryParseContext.parseInnerFilter(QueryParseContext.java:264)
    at org.elasticsearch.index.query.BoolFilterParser.parse(BoolFilterParser.java:92)
    at org.elasticsearch.index.query.QueryParseContext.executeFilterParser(QueryParseContext.java:283)
    at org.elasticsearch.index.query.QueryParseContext.parseInnerFilter(QueryParseContext.java:264)
    at org.elasticsearch.index.query.FilteredQueryParser.parse(FilteredQueryParser.java:74)
    at org.elasticsearch.index.query.QueryParseContext.parseInnerQuery(QueryParseContext.java:227)
    at org.elasticsearch.index.query.IndexQueryParserService.parse(IndexQueryParserService.java:334)
    at org.elasticsearch.index.query.IndexQueryParserService.parse(IndexQueryParserService.java:260)
    at org.elasticsearch.search.query.QueryParseElement.parse(QueryParseElement.java:33)
    at org.elasticsearch.search.SearchService.parseSource(SearchService.java:633)
    ... 9 more
[2014-07-04 07:59:45,985][DEBUG][action.search.type       ] [Tantra] [application][1], node[jUaCLA6GTyadduwbg_tTwg], [P], s[STARTED]: Failed to execute [org.elasticsearch.action.search.SearchRequest@6fa23b68] lastShard [true]
org.elasticsearch.search.SearchParseException: [application][1]: from[-1],size[-1]: Parse Failure [Failed to parse source [{
  "query": {
    "filtered": {
      "filter": {
        "bool": {
          "must": [
            {
              "has_parent": {
                "type": "clients",
                "query": {
                  "bool": {
                    "must": [],
                    "must_not": [],
                    "should": []
                  }
                },
                "filter": {
                  "bool": {
                    "must": [
                      {
                        "terms": {
                          "interests": [
                            "hello"
                          ]
                        }
                      }
                    ],
                    "must_not": [],
                    "should": []
                  }
                }
              }
            },
            {
              "geo_distance": {
                "distance": "20km",
                "coordinate": "59.85499699999999,17.6490213"
              }
            }
          ],
          "must_not": [],
          "should": []
        }
      },
      "query": []
    }
  },
  "size": 25
}
]]
    at org.elasticsearch.search.SearchService.parseSource(SearchService.java:649)
    at org.elasticsearch.search.SearchService.createContext(SearchService.java:511)
    at org.elasticsearch.search.SearchService.createAndPutContext(SearchService.java:483)
    at org.elasticsearch.search.SearchService.executeQueryPhase(SearchService.java:252)
    at org.elasticsearch.search.action.SearchServiceTransportAction$5.call(SearchServiceTransportAction.java:206)
    at org.elasticsearch.search.action.SearchServiceTransportAction$5.call(SearchServiceTransportAction.java:203)
    at org.elasticsearch.search.action.SearchServiceTransportAction$23.run(SearchServiceTransportAction.java:517)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
    at java.lang.Thread.run(Thread.java:744)
Caused by: java.lang.NullPointerException
    at org.elasticsearch.common.xcontent.XContentHelper.createParser(XContentHelper.java:46)
    at org.elasticsearch.index.query.support.XContentStructure.asQuery(XContentStructure.java:88)
    at org.elasticsearch.index.query.support.XContentStructure$InnerQuery.asQuery(XContentStructure.java:154)
    at org.elasticsearch.index.query.HasParentFilterParser.parse(HasParentFilterParser.java:115)
    at org.elasticsearch.index.query.QueryParseContext.executeFilterParser(QueryParseContext.java:283)
    at org.elasticsearch.index.query.QueryParseContext.parseInnerFilter(QueryParseContext.java:264)
    at org.elasticsearch.index.query.BoolFilterParser.parse(BoolFilterParser.java:92)
    at org.elasticsearch.index.query.QueryParseContext.executeFilterParser(QueryParseContext.java:283)
    at org.elasticsearch.index.query.QueryParseContext.parseInnerFilter(QueryParseContext.java:264)
    at org.elasticsearch.index.query.FilteredQueryParser.parse(FilteredQueryParser.java:74)
    at org.elasticsearch.index.query.QueryParseContext.parseInnerQuery(QueryParseContext.java:227)
    at org.elasticsearch.index.query.IndexQueryParserService.parse(IndexQueryParserService.java:334)
    at org.elasticsearch.index.query.IndexQueryParserService.parse(IndexQueryParserService.java:260)
    at org.elasticsearch.search.query.QueryParseElement.parse(QueryParseElement.java:33)
    at org.elasticsearch.search.SearchService.parseSource(SearchService.java:633)
    ... 9 more
[2014-07-04 07:59:45,985][DEBUG][action.search.type       ] [Tantra] [application][0], node[jUaCLA6GTyadduwbg_tTwg], [P], s[STARTED]: Failed to execute [org.elasticsearch.action.search.SearchRequest@6fa23b68] lastShard [true]
org.elasticsearch.search.SearchParseException: [application][0]: from[-1],size[-1]: Parse Failure [Failed to parse source [{
  "query": {
    "filtered": {
      "filter": {
        "bool": {
          "must": [
            {
              "has_parent": {
                "type": "clients",
                "query": {
                  "bool": {
                    "must": [],
                    "must_not": [],
                    "should": []
                  }
                },
                "filter": {
                  "bool": {
                    "must": [
                      {
                        "terms": {
                          "interests": [
                            "hello"
                          ]
                        }
                      }
                    ],
                    "must_not": [],
                    "should": []
                  }
                }
              }
            },
            {
              "geo_distance": {
                "distance": "20km",
                "coordinate": "59.85499699999999,17.6490213"
              }
            }
          ],
          "must_not": [],
          "should": []
        }
      },
      "query": []
    }
  },
  "size": 25
}
]]
    at org.elasticsearch.search.SearchService.parseSource(SearchService.java:649)
    at org.elasticsearch.search.SearchService.createContext(SearchService.java:511)
    at org.elasticsearch.search.SearchService.createAndPutContext(SearchService.java:483)
    at org.elasticsearch.search.SearchService.executeQueryPhase(SearchService.java:252)
    at org.elasticsearch.search.action.SearchServiceTransportAction$5.call(SearchServiceTransportAction.java:206)
    at org.elasticsearch.search.action.SearchServiceTransportAction$5.call(SearchServiceTransportAction.java:203)
    at org.elasticsearch.search.action.SearchServiceTransportAction$23.run(SearchServiceTransportAction.java:517)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
    at java.lang.Thread.run(Thread.java:744)
Caused by: java.lang.NullPointerException
    at org.elasticsearch.common.xcontent.XContentHelper.createParser(XContentHelper.java:46)
    at org.elasticsearch.index.query.support.XContentStructure.asQuery(XContentStructure.java:88)
    at org.elasticsearch.index.query.support.XContentStructure$InnerQuery.asQuery(XContentStructure.java:154)
    at org.elasticsearch.index.query.HasParentFilterParser.parse(HasParentFilterParser.java:115)
    at org.elasticsearch.index.query.QueryParseContext.executeFilterParser(QueryParseContext.java:283)
    at org.elasticsearch.index.query.QueryParseContext.parseInnerFilter(QueryParseContext.java:264)
    at org.elasticsearch.index.query.BoolFilterParser.parse(BoolFilterParser.java:92)
    at org.elasticsearch.index.query.QueryParseContext.executeFilterParser(QueryParseContext.java:283)
    at org.elasticsearch.index.query.QueryParseContext.parseInnerFilter(QueryParseContext.java:264)
    at org.elasticsearch.index.query.FilteredQueryParser.parse(FilteredQueryParser.java:74)
    at org.elasticsearch.index.query.QueryParseContext.parseInnerQuery(QueryParseContext.java:227)
    at org.elasticsearch.index.query.IndexQueryParserService.parse(IndexQueryParserService.java:334)
    at org.elasticsearch.index.query.IndexQueryParserService.parse(IndexQueryParserService.java:260)
    at org.elasticsearch.search.query.QueryParseElement.parse(QueryParseElement.java:33)
    at org.elasticsearch.search.SearchService.parseSource(SearchService.java:633)
    ... 9 more
[2014-07-04 07:59:45,985][DEBUG][action.search.type       ] [Tantra] [application][4], node[jUaCLA6GTyadduwbg_tTwg], [P], s[STARTED]: Failed to execute [org.elasticsearch.action.search.SearchRequest@6fa23b68] lastShard [true]
org.elasticsearch.search.SearchParseException: [application][4]: from[-1],size[-1]: Parse Failure [Failed to parse source [{
  "query": {
    "filtered": {
      "filter": {
        "bool": {
          "must": [
            {
              "has_parent": {
                "type": "clients",
                "query": {
                  "bool": {
                    "must": [],
                    "must_not": [],
                    "should": []
                  }
                },
                "filter": {
                  "bool": {
                    "must": [
                      {
                        "terms": {
                          "interests": [
                            "hello"
                          ]
                        }
                      }
                    ],
                    "must_not": [],
                    "should": []
                  }
                }
              }
            },
            {
              "geo_distance": {
                "distance": "20km",
                "coordinate": "59.85499699999999,17.6490213"
              }
            }
          ],
          "must_not": [],
          "should": []
        }
      },
      "query": []
    }
  },
  "size": 25
}
]]
    at org.elasticsearch.search.SearchService.parseSource(SearchService.java:649)
    at org.elasticsearch.search.SearchService.createContext(SearchService.java:511)
    at org.elasticsearch.search.SearchService.createAndPutContext(SearchService.java:483)
    at org.elasticsearch.search.SearchService.executeQueryPhase(SearchService.java:252)
    at org.elasticsearch.search.action.SearchServiceTransportAction$5.call(SearchServiceTransportAction.java:206)
    at org.elasticsearch.search.action.SearchServiceTransportAction$5.call(SearchServiceTransportAction.java:203)
    at org.elasticsearch.search.action.SearchServiceTransportAction$23.run(SearchServiceTransportAction.java:517)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
    at java.lang.Thread.run(Thread.java:744)
Caused by: java.lang.NullPointerException
    at org.elasticsearch.common.xcontent.XContentHelper.createParser(XContentHelper.java:46)
    at org.elasticsearch.index.query.support.XContentStructure.asQuery(XContentStructure.java:88)
    at org.elasticsearch.index.query.support.XContentStructure$InnerQuery.asQuery(XContentStructure.java:154)
    at org.elasticsearch.index.query.HasParentFilterParser.parse(HasParentFilterParser.java:115)
    at org.elasticsearch.index.query.QueryParseContext.executeFilterParser(QueryParseContext.java:283)
    at org.elasticsearch.index.query.QueryParseContext.parseInnerFilter(QueryParseContext.java:264)
    at org.elasticsearch.index.query.BoolFilterParser.parse(BoolFilterParser.java:92)
    at org.elasticsearch.index.query.QueryParseContext.executeFilterParser(QueryParseContext.java:283)
    at org.elasticsearch.index.query.QueryParseContext.parseInnerFilter(QueryParseContext.java:264)
    at org.elasticsearch.index.query.FilteredQueryParser.parse(FilteredQueryParser.java:74)
    at org.elasticsearch.index.query.QueryParseContext.parseInnerQuery(QueryParseContext.java:227)
    at org.elasticsearch.index.query.IndexQueryParserService.parse(IndexQueryParserService.java:334)
    at org.elasticsearch.index.query.IndexQueryParserService.parse(IndexQueryParserService.java:260)
    at org.elasticsearch.search.query.QueryParseElement.parse(QueryParseElement.java:33)
    at org.elasticsearch.search.SearchService.parseSource(SearchService.java:633)
    ... 9 more
[2014-07-04 07:59:45,985][DEBUG][action.search.type       ] [Tantra] [application][3], node[jUaCLA6GTyadduwbg_tTwg], [P], s[STARTED]: Failed to execute [org.elasticsearch.action.search.SearchRequest@6fa23b68]
org.elasticsearch.search.SearchParseException: [application][3]: from[-1],size[-1]: Parse Failure [Failed to parse source [{
  "query": {
    "filtered": {
      "filter": {
        "bool": {
          "must": [
            {
              "has_parent": {
                "type": "clients",
                "query": {
                  "bool": {
                    "must": [],
                    "must_not": [],
                    "should": []
                  }
                },
                "filter": {
                  "bool": {
                    "must": [
                      {
                        "terms": {
                          "interests": [
                            "hello"
                          ]
                        }
                      }
                    ],
                    "must_not": [],
                    "should": []
                  }
                }
              }
            },
            {
              "geo_distance": {
                "distance": "20km",
                "coordinate": "59.85499699999999,17.6490213"
              }
            }
          ],
          "must_not": [],
          "should": []
        }
      },
      "query": []
    }
  },
  "size": 25
}
]]
    at org.elasticsearch.search.SearchService.parseSource(SearchService.java:649)
    at org.elasticsearch.search.SearchService.createContext(SearchService.java:511)
    at org.elasticsearch.search.SearchService.createAndPutContext(SearchService.java:483)
    at org.elasticsearch.search.SearchService.executeQueryPhase(SearchService.java:252)
    at org.elasticsearch.search.action.SearchServiceTransportAction$5.call(SearchServiceTransportAction.java:206)
    at org.elasticsearch.search.action.SearchServiceTransportAction$5.call(SearchServiceTransportAction.java:203)
    at org.elasticsearch.search.action.SearchServiceTransportAction$23.run(SearchServiceTransportAction.java:517)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
    at java.lang.Thread.run(Thread.java:744)
Caused by: java.lang.NullPointerException
    at org.elasticsearch.common.xcontent.XContentHelper.createParser(XContentHelper.java:46)
    at org.elasticsearch.index.query.support.XContentStructure.asQuery(XContentStructure.java:88)
    at org.elasticsearch.index.query.support.XContentStructure$InnerQuery.asQuery(XContentStructure.java:154)
    at org.elasticsearch.index.query.HasParentFilterParser.parse(HasParentFilterParser.java:115)
    at org.elasticsearch.index.query.QueryParseContext.executeFilterParser(QueryParseContext.java:283)
    at org.elasticsearch.index.query.QueryParseContext.parseInnerFilter(QueryParseContext.java:264)
    at org.elasticsearch.index.query.BoolFilterParser.parse(BoolFilterParser.java:92)
    at org.elasticsearch.index.query.QueryParseContext.executeFilterParser(QueryParseContext.java:283)
    at org.elasticsearch.index.query.QueryParseContext.parseInnerFilter(QueryParseContext.java:264)
    at org.elasticsearch.index.query.FilteredQueryParser.parse(FilteredQueryParser.java:74)
    at org.elasticsearch.index.query.QueryParseContext.parseInnerQuery(QueryParseContext.java:227)
    at org.elasticsearch.index.query.IndexQueryParserService.parse(IndexQueryParserService.java:334)
    at org.elasticsearch.index.query.IndexQueryParserService.parse(IndexQueryParserService.java:260)
    at org.elasticsearch.search.query.QueryParseElement.parse(QueryParseElement.java:33)
    at org.elasticsearch.search.SearchService.parseSource(SearchService.java:633)
    ... 9 more
[2014-07-04 07:59:45,999][DEBUG][action.search.type       ] [Tantra] All shards failed for phase: [query]

Mapping

{
    "application": {
        "mappings": {
            "clients": {
                "properties": {
                    "createdAt": {
                        "format": "date_time_no_millis",
                        "type": "date"
                    },
                    "email": {
                        "type": "string"
                    },
                    "facebookId": {
                        "type": "long"
                    },
                    "favorites": {
                        "type": "integer"
                    },
                    "id": {
                        "type": "integer"
                    },
                    "interests": {
                        "type": "string"
                    },
                    "name": {
                        "type": "string"
                    },
                    "surname": {
                        "type": "string"
                    },
                    "updatedAt": {
                        "format": "date_time_no_millis",
                        "type": "date"
                    }
                }
            },
            "devices": {
                "_parent": {
                    "type": "clients"
                },
                "_routing": {
                    "required": true
                },
                "properties": {
                    "active": {
                        "type": "boolean"
                    },
                    "appName": {
                        "type": "string"
                    },
                    "appVersion": {
                        "type": "string"
                    },
                    "carrier": {
                        "type": "string"
                    },
                    "coordinate": {
                        "type": "geo_point"
                    },
                    "country": {
                        "index": "not_analyzed",
                        "type": "string"
                    },
                    "createdAt": {
                        "format": "date_time_no_millis",
                        "type": "date"
                    },
                    "deviceId": {
                        "index": "not_analyzed",
                        "type": "string"
                    },
                    "deviceModel": {
                        "type": "string"
                    },
                    "deviceName": {
                        "type": "string"
                    },
                    "id": {
                        "index": "not_analyzed",
                        "type": "string"
                    },
                    "inactivatedAt": {
                        "format": "date_time_no_millis",
                        "type": "date"
                    },
                    "mobileCountryCode": {
                        "index": "not_analyzed",
                        "type": "string"
                    },
                    "os": {
                        "type": "string"
                    },
                    "osVersion": {
                        "type": "string"
                    },
                    "pushNotificationId": {
                        "index": "not_analyzed",
                        "type": "string"
                    },
                    "updatedAt": {
                        "format": "date_time_no_millis",
                        "type": "date"
                    }
                }
            }
        }
    }
}
@s1monw s1monw added bug labels Jul 4, 2014
@s1monw s1monw self-assigned this Jul 4, 2014
s1monw added a commit to s1monw/elasticsearch that referenced this issue Jul 4, 2014
This causes a NPE since XContentStructure checks if the query is null
and takes this as the condition to parse from the byte source which is
actually null in that case.

Closes elastic#6722
@s1monw
Copy link
Contributor

s1monw commented Jul 4, 2014

thanks for opening this.. I have a fix for that already and will push it soon. as a workaround just use a match_all query instead of the:

  "bool" : {
    "must": [],
    "must_not": [],
    "should": []
  }

s1monw added a commit that referenced this issue Jul 4, 2014
This causes a NPE since XContentStructure checks if the query is null
and takes this as the condition to parse from the byte source which is
actually null in that case.

Closes #6722
s1monw added a commit that referenced this issue Jul 4, 2014
This causes a NPE since XContentStructure checks if the query is null
and takes this as the condition to parse from the byte source which is
actually null in that case.

Closes #6722
s1monw added a commit that referenced this issue Jul 4, 2014
This causes a NPE since XContentStructure checks if the query is null
and takes this as the condition to parse from the byte source which is
actually null in that case.

Closes #6722
@s1monw s1monw changed the title [Bug] NullPointException when parsing query [Query] QueryParser can return null from a query causing NullPointerExceptions Jul 7, 2014
@clintongormley clintongormley changed the title [Query] QueryParser can return null from a query causing NullPointerExceptions Search: QueryParser can return null from a query causing NullPointerExceptions Jul 9, 2014
@clintongormley clintongormley changed the title Search: QueryParser can return null from a query causing NullPointerExceptions Search: Replace empty bool queries with match_all to prevent NullPointerExceptions Jul 9, 2014
@clintongormley clintongormley added the :Search/Search Search-related issues that do not fall into other categories label Jun 7, 2015
@clintongormley clintongormley changed the title Search: Replace empty bool queries with match_all to prevent NullPointerExceptions Replace empty bool queries with match_all to prevent NullPointerExceptions Jun 7, 2015
@clintongormley clintongormley removed the :Search/Search Search-related issues that do not fall into other categories label Jun 7, 2015
mute pushed a commit to mute/elasticsearch that referenced this issue Jul 29, 2015
This causes a NPE since XContentStructure checks if the query is null
and takes this as the condition to parse from the byte source which is
actually null in that case.

Closes elastic#6722
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants