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

Associated record / Store all relations in index. #4912

Merged
merged 2 commits into from
Aug 10, 2020

Commits on Aug 3, 2020

  1. Associated record / Store all relations in index.

    Store all associated records using a structure like:
    
    ```json
    "recordLink" : [
        {
          "to" : "792361bb-4cfa-409f-9762-ab42e5a05b39",
          "origin" : "catalog",
          "created" : "bySearch",
          "title" : "Concentration en habitants dans un rayon de 500m en Wallonie - Service de visualisation REST",
          "url" : "http://localhost:8080/geonetwork/srv/api/records/792361bb-4cfa-409f-9762-ab42e5a05b39",
          "type" : "services"
        }, ...
    ```
    
    in the document index. Using those information, the list of related records can be directly displayed in search result or record view.
    The main drawback is that user privileges are not taken into account. The title of a record not visible by current user may be displayed.
    The main advantages of this approach is that it is much faster than the related API.
    
    A couple of issues are identified.
    
    As we use the index to query for relations (relation not stored in children, bidirectional sibling, dataset operatedBy), the indexing must be 2 steps:
    * First index all records
    * Then index relations
    
    Currently it is hard to only do a partial indexing. In this case, we only need to collect recordLink and update the doc in the index.
    
    While editing a record, all related before and after the editing session needs to be update.
    We should collect all UUIDs affected by the current session, and index them following the rule above.
    fxprunayre committed Aug 3, 2020
    Configuration menu
    Copy the full SHA
    af176e7 View commit details
    Browse the repository at this point in the history

Commits on Aug 10, 2020

  1. Update en-admin.json

    fxprunayre committed Aug 10, 2020
    Configuration menu
    Copy the full SHA
    728ca8a View commit details
    Browse the repository at this point in the history