How can i create this indices?

(main subject is changed to companies)
I don't have any budget. I'm student. I wanna try to use Elasticsearch in my education
I'm using Node.JS

JSON example:

"companies" : 
[{
   "title" : "value",
   "hash" : "UniqueValue",
   ...
   "employees" : [
         "position" : ["EmployeeName", "EmployeeName", "EmployeeName"],
         "position" : "EmployeeName",
         ...
         "position" : "EmployeeName"
      ],
   "key" : "value"
}, and so on]

More than 1000 different "position" exists. Every company have about 15 employees.

client.indices.create({
	index: "компании",
	body: {
		"mappings": {
			"companies": {
				"properties": {
					"title": {
						"type": "string"
					},
					"hash": {
						"type": "string"
					},
					...
					"employees": {
						???
					}
				}
			}
		}
	}
}, function (error, response) {
	var body = GetData();
	client.bulk({
		body: body
	}, function (err, resp) {
		res.render('index', {result: 'Indexing Completed!'});
	})
});

Questions:

  1. How can i implement "employees"?
  2. Since "hash" is unique - already existed values should be replaced with newest. Obviously i can just try to remove object with "hash" from database before add new information, but in my mind i'm not supposed to do that. There will be 5-10 removes every second and i think that this may potentially slow down the database in my case (since i'm just a student and don't have any big budgets for high-performance servers).

PS The main target is search - "employees". In 99% cases only they will be a criteria of query. Search may contain all 15 employees.

PPS What if i have much bigger object? Should i separate it or not? How?
Example:

"companies" : 
[{
   "title" : "value",
   "hash" : "UniqueValue",
   ...
   "employees" : [
         "position" : ["EmployeeName", "EmployeeName", "EmployeeName"],
         "position" : "EmployeeName",
         "position" : ["key" : [values], "key" : ["key" : [values], "key" : ["key" : [values]]]], 
         ...
         "position" : "EmployeeName"
      ],
   "key" : "value"
}, and so on]

Hi,

you should have a read the data modelling section of the Elasticsearch definitive guide and especially at parent-child. As you actually want to search for employees I think this should be a good fit.

Based on your example I'd create a "companies" index. Each company is one document in the index and has employees as child documents. The way you have modeled it now, you have just one huge document containing all documents.

Daniel