Internals of array of strings vs. concatenated string

I am trying to better understand internals of ElasticSearch, so I would like to know if there are any differences in how ElasticSearch internally computes term statistics for the following two cases.

The first case is when I have documents like:

{
  "foo": [
    {
      "bar": "long string"
    },
    {
      "bar": "another long string"
    }
  ]
}

Or a document like:

{
  "foobar": "long string another long string"
}

My understanding is that the first document gets flattened to:

{
  "foo.bar": ["long string", "another long string"]
}

So it seems the question is really, is the second and third documents indexed the same? Is term statistics computed the same?

I got an answer to it on Stack Overflow.

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