0

So far I have database with many to many relation. Tables is "lists" and "objects" where list contains many objects and objects could be in many lists. I have solr denormalized documents and search is working fast. But problem is with indexing. I can not find any information how to reindex such documents. Main problem is that if parent (List) is changed, all related objects in solr have to be reindexed. And to do that php need to collect all object information from database and put them in solr. So if list contains 100 000 objects it is slow and many times ends with memory or execution time limit exception. Requirement is to be searchable after data is changed in database, so delta import is not an option.

I found that Elasticsearch has parent/child and allow update only parent data. But I can not find any solution for many to many relation and parent/child works only with one to many relation.

So what is best practice how to handle this situations? Any guidance would be appreciated.

DMG
  • 131
  • 1
  • 5
  • see if this helps http://stackoverflow.com/questions/11823287/many-to-many-relationships-in-elasticsearch – Amal Gupta Apr 18 '16 at 09:02
  • Saw this post, but I can not find there any answer. And as I said, reindexing is a problem for me, so answer "reindexing is an acceptable solution" do not explain anything. – DMG Apr 18 '16 at 09:36

0 Answers0