I'm new on elasticsearch and in programming . My purpose is to use the search engine in order to search my employees according to their skills and their availabilities.
For the skills everything is good. For availability, I have no idea how could I do ? How could I map the document and how could I make a research.
Until now for each employee, I have a calendar with days of availability and days of unavailability.
Is it possible to do a research with a day of beginning and a day of end and display the number of day of availability ? or even diplay the date of each day of availability or unavailability ?
Does someone have any idea ? or a new way of thinking to resolve this problem ?
You build a separate index "employee_schedule" where you save the available dates of each employee. Afterwards you can filter by range and employee_id, i.e.:
Index: employee
Fields: Id, Firstname, Lastname
Index: employee_schedule
Fields: Id, Employee_Id (link to employee index / maybe as parent field), available_date_start, available_date_end
So each employee can have multiple employee schedule entries... in your application logic you have to check for overlapping date ranges and prevent them.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.