V
V
VitaliyBorys2018-09-27 13:41:51
MySQL
VitaliyBorys, 2018-09-27 13:41:51

How to implement elasticsearch index search?

MYSQL has a database with a trace. tables:
-users (id,name,email,password,status_verify).
-connections_user (user1_id,user2_id) - friends storage table.
-groups (title,description,logo) - table of groups.
-group_user(id,user_id,group_id)
-city (id,title)
-city_user (id,city_id,user_id) The
task is to use ElasticSearch as a search engine.
It is necessary to find users for whom a match was found and sort them by trace. priorities.
1. Your friends are displayed ( connections_user )
2. Users who are in the same group with you are displayed
3. Users with whom you have a common city
4. All other users in alphabetical order.
I have no experience with ElastisSearch, but I need to do it)) I read a lot of articles on this engine, but you yourself understand that without experience it will not work out normally. Could you suggest what mapping should be done in the index, and what types should be done. I suspect that it is necessary to do denormalization. Any ideas on the implementation of this task will be VERY HAPPY.)
The project is written in Laravel + Vue.js

Answer the question

In order to leave comments, you need to log in

2 answer(s)
X
xmoonlight, 2018-09-27
@xmoonlight

Here

D
Dimonchik, 2018-09-27
@dimonchik2013

denormalize basis on one form and in an elastic
work out all zvprosy? No? for one more

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question