Is it possible to join field via conditions?

I have structure

{
  id: 1
  name: "Root folder"
  parent_id: 0,
  inherit_folder_id: null,
  inherit_permission: false,
  permissions: [some permissions]
}, {
  id: 2
  name: "Accounts"
  parent_id: 1,
  inherit_folder_id: 1,
  inherit_permission: true,
  permissions: [some permissions]
}, {
  id: 3
  name: "Finance"
  parent_id: 2,
  inherit_folder_id: 1,
  inherit_permission: true,
  permissions: [some permissions]
}

So, In this case I need to check if inherit_permission = true join by field inherit_folder_id. In this case for folder Finance I need join Root folder and check permissions of this folder for folder Finance

Welcome to our community! :smiley:

Elasticsearch cannot do this, you need to do it externally.

Does it means I don't need use Elasticsearch at all? Because Any folders may have sub sub sub .... folders. Some of them have more than 15.
For that as I understand I need update all childs after every update

Hi @Stanislau_Karaliou .

Analyzing your scenario I think the Path hierarchy would adapt well. I would try to use it.

@RabBit_BR how can it helps me? It's about tokenizer, but I need get different index permissions.
Maybe I missunderstand something

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.