Elasticsearch indexing -
i using elasticsearch in project. have 2 indexes 1 contains list of employ id’s , other contains employee_name, joining date , employee id. there way can use employee id 1 index , find employee information other index?
index list of employee id:
june 1st 2015, 12:02:15.209 message:8997745
june 1st 2015, 12:02:15.210 message:8997728
june 1st 2015, 12:02:15.211 message:8997719
index list of employee information:
june 1st 2015, 12:02:15.205 message: bob,2015-05-31,8997745
june 1st 2015, 12:02:15.206 message: james,2015-05-31,8997728
june 1st 2015, 12:02:15.207 message: tom,2015-05-31,8997719
also, noticed each entry in index has unique id. there way can provide unique id index entries same index have same index id?
thanks in advance!
depending on needs, can either in code (read employee_id index1 , ids filter lookup (https://www.elastic.co/guide/en/elasticsearch/reference/1.7/query-dsl-ids-filter.html).
this might not practical large lists of employees. if have large list in first index has employee ids, might useful scan-scroll query on second index , check employee ids query first index (https://www.elastic.co/guide/en/elasticsearch/guide/current/scan-scroll.html?q=scan%20scroll). of course, lose sorting.
a more advanced option really large datasets might use elasticsearch-hadoop , write spark sql query or that. depends on use case. why there first index employee ids?
Comments
Post a Comment