Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

smart eager indexing #39

Open
nbittich opened this issue May 19, 2022 · 0 comments
Open

smart eager indexing #39

nbittich opened this issue May 19, 2022 · 0 comments
Labels
enhancement New feature or request

Comments

@nbittich
Copy link
Contributor

nbittich commented May 19, 2022

Suppose the following mu-auth config:

 %GroupSpec{
        name: "acmidm-lezer",
        useage: [:read],
        access: access_by_role( "ABBOrganisatiePortaalGebruiker-lezer" ),
        graphs: [
          %GraphSpec{
            graph: "http://mu.semte.ch/graphs/organisatieportaal",
            constraint: %ResourceConstraint{
              resource_types: @protected_resource_type
            }
          }
        ]
      },
             %GroupSpec{
        name: "acmidm-editeerder",
        useage: [:read, :write, :read_for_write],
        access: access_by_role( "ABBOrganisatiePortaalGebruiker-editeerder" ),
        graphs: [
          %GraphSpec{
            graph: "http://mu.semte.ch/graphs/organisatieportaal",
            constraint: %ResourceConstraint{
              resource_types: @protected_resource_type
            }
          }
        ]
      },
      
      # ... rest of the config

And the following mu-search config (additive index on):

 "additive_indexes": true,
 "automatic_index_updates": true,
 "persist_indexes": true,
 "number_of_threads": 11,
 "eager_indexing_groups": [
   [
     {
       "variables": [],
       "name": "clean"
     }
   ],
   [
     {
       "variables": [],
       "name": "acmidm-lezer"
     }
   ],
   [
     {
       "variables": [],
       "name": "acmidm-editeerder"
     }
   ],
   [
     {
       "variables": [],
       "name": "acmidm-beheerder"
     }
   ]
 ]
  • Although each group shares the same kind of resources (but with different rights), a full indexing is performed for each of them
  • if a user has multiple roles (then is in multiple groups, e.g lezer + editeerder), a full indexing is performed for that combination of roles

It would be nice if:

  • we could fine-tune that behavior. e.g having an option like:
    [
    {
      "variables": [],
      "name": "acmidm-beheerder",
      "alias_of": "acmidm-lezer"
    }
  ]

=> in that case, if alias_of is present, it won't create a new index but will just reuse the one for acmidm-lezer

This might solve the first problem, but looks like a hack & doesn't solve the second one, when mu-auth returns a combination of groups. For that one, I don't have yet a very good idea on how to solve it.

@nvdk nvdk added the enhancement New feature or request label Sep 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants