Elasticsearch Inner with shop

Asked

Viewed 61 times

0

In my project there are about 40,000 products from different stores, but to return a search for Elasticsearch,I need the city and state filter where the store is located. The problem is this, if a store has 10,000 products, I should put the store location on all products, or is there some way to make a kind of Mysql equal Internet?

1 answer

1


Hello, Elasticsearch works with data collections. Therefore you do not have foreign key with strong referential integrity as in relational banks. In your case I would put the store id on Collection to use as key in the search.

  • 1

    But there it is. I don’t care about the store, but its location.

  • Are you only using Elasticsearch? You have to think that Elasticsearch is just one of the tools you have. You need to relate the data and not just save and query. Then having a handle from the shop you arrive at the shop and take the latitude and longitude. To be honest, it’s pretty relative, anyway. There are n ways to do this, but I believe the most modularized is the most correct, would you prefer to update all or product as a new location? or just a store record?

Browser other questions tagged

You are not signed in. Login or sign up in order to post.