Is this right? Nested array will slow down deep search

Initially, there was a nested array in my document but I didn't search any field in the array, when I profiled the _search, I found out there were children query on the nested array (something like below, it has such TermQuery on all elements in the nested array). entries is a nested array in the document.

            {
              "type": "TermQuery",
              "description": "_type:__entries",
              "time": "52.51162800ms",
              "time_in_nanos": 52511628,
              "breakdown": {
                "score": 0,
                "build_scorer_count": 1,
                "match_count": 0,
                "create_weight": 440,
                "next_doc": 0,
                "match": 0,
                "create_weight_count": 1,
                "next_doc_count": 0,
                "score_count": 0,
                "build_scorer": 6986,
                "advance": 52402089,
                "advance_count": 102111
              }
            },

And for test purpose, I turned off the nested array in the document, I haven't really benchmarked the before and the after yet, but I hardly see any time out from my search any more afterwards.

Here are my questions:

  1. Even the query term is not against the nested array, it will slow down the query dramatically, is this true?
  2. If the 1 is true, if it's possible to stop querying the nested array in this case?

Thanks,
Frank

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.