Elastic search array value

Hi

Woud like to ask for advice on array type value
Example, I got my index mapping for this field

author: {
type: integer
}

and when we store the value we would like to store as array as might contain 1 or more

Example

author: [1, 2, 3]

my question is if we got just 1 value, do we store as a) or b)

a) author: 1
b) author: [1]

we looking to store as array [1] as standard array value to use for search, filter and aggregation. is there standard that we should store as author:1 that im not aware of? or array should be good enough

Other values we store as below:

for multiple value, we store as
author:[1,2,3]

and if empty, we store as
author:

In my opinion, if you are dealing with arrays, you should index only arrays. Therefore, option B would be the ideal choice if there were only one element in the array.

This helps maintain consistency in documents. Imagine the effort required to determine whether document A or B has field X as an array or not. Additionally, when working with scripts, you don't need to check whether the field is an array or not.

I recommend reading this document, which may be helpful: Arrays | Elasticsearch Guide [8.13] | Elastic