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

inner hits: huge number in "size" makes node go OOM even with very few docs #13394

Closed
brwe opened this issue Sep 8, 2015 · 2 comments
Closed
Labels
>enhancement help wanted adoptme :Search/Search Search-related issues that do not fall into other categories

Comments

@brwe
Copy link
Contributor

brwe commented Sep 8, 2015

spin off from https://discuss.elastic.co/t/difficulty-in-formulating-query-for-my-usecase/28773/4

The below example will make elasticsearch 1.7.1 OOM. I assume this is similar to #12510 ?


DELETE testidx

PUT testidx
{
  "mappings": {
    "doc": {
      "properties": {
        "inner_hits": {
          "type": "nested"
        }
      }
    }
  }
}

POST testidx/doc
{
  "Language": [
    "English"
  ],
  "Tags": [
    "MT",
    "MUMBAI",
    "CHEN"
  ],
  "_boost": 3,
  "inner_hits": [
    {
      "Code": "ET00009709",
      "IsDefault": "",
      "Language": "English",
      "Format": "3D",
      "Region": "MUMBAI"
    },
    {
      "Code": "ET00009710",
      "IsDefault": "Y",
      "Language": "English",
      "Format": "2D",
      "Region": "CHEN"
    },
    {
      "Code": "ET00009713",
      "IsDefault": "",
      "Language": "Hindi",
      "Format": "2D",
      "Region": "MUMBAI"
    },
    {
      "Code": "ET00009714",
      "IsDefault": "",
      "Language": "Tamil",
      "Format": "3D",
      "Region": "MUMBAI"
    },
    {
      "Code": "ET00009715",
      "IsDefault": "",
      "Language": "Hindi",
      "Format": "3D",
      "Region": "MUMBAI"
    },
    {
      "Code": "ET00009716",
      "IsDefault": "",
      "Language": "Bengali",
      "Format": "2D",
      "Region": "MUMBAI"
    }
  ]
}

POST testidx/_search
{
  "fields": [], 
  "query": {
    "nested": {
      "path": "inner_hits",
      "query": {
        "match": {
          "Region": "MUMBAI"
        }
      },
      "inner_hits": {
        "size": 100000000
      }
    }
  }
}

@martijnvg
Copy link
Member

@brwe Yes, this is similar to #12510 and should be solved in the same as was done in top_hits aggregator.

@clintongormley
Copy link

will also be helped by #13188

martijnvg added a commit to martijnvg/elasticsearch that referenced this issue Sep 9, 2015
martijnvg added a commit that referenced this issue Sep 9, 2015
martijnvg added a commit that referenced this issue Sep 9, 2015
@clintongormley clintongormley added :Search/Search Search-related issues that do not fall into other categories and removed :Inner Hits labels Feb 14, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
>enhancement help wanted adoptme :Search/Search Search-related issues that do not fall into other categories
Projects
None yet
Development

No branches or pull requests

3 participants