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

Refactor Valkyrie indexer API (to match forms) #6441

Merged
merged 5 commits into from
Nov 17, 2023
Merged

Commits on Nov 16, 2023

  1. Move indexer modules into app/indexers/concerns/

    The `app/indexers/` directory is kind of messy, and it’s not clear what
    is an indexer class and what is a module that indexers can include.
    Moving these files clarifies the situation.
    marrus-sh committed Nov 16, 2023
    Configuration menu
    Copy the full SHA
    5113e19 View commit details
    Browse the repository at this point in the history
  2. Refactor Valkyrie indexer API (to match forms)

    This is a kind of heavy refactor of the Valkyrie indexer classes to
    match the API used for forms. This means :⁠—
    
    - Using configurable classes, like
      `Hyrax.config.pcdm_collection_indexer`, instead of hardcoded ones.
    
    - Renaming all of the classes to follow a pattern and be namespaced to
      `Hyrax::Indexers` :⁠—
    
      - `Hyrax::ValkyrieIndexer` 🔜 `Hyrax::Indexers::ResourceIndexer`.
    
        **Note:** This is a somewhat less‐basic base class, as it includes
        `Hyrax::ResourceIndexer`. If we still want `Hyrax::ValkyrieIndexer`
        as a base class which does not utilize `Hyrax::ResourceIndexer`,
        that’s probably an option.
    
      - `Hyrax::PcdmCollectionIndexer` 🔜
        `Hyrax::Indexers::PcdmCollectionIndexer`.
    
        **Note:** This class has already been renamed once in the past (it
        was originally `Hyrax::ValkyrieCollectionIndexer`; see
        7ca32a5).
    
      - `Hyrax::ValkyrieFileSetIndexer` 🔜 `Hyrax::Indexers::FileSetIndexer`.
    
      - `Hyrax::ValkyrieWorkIndexer` 🔜 `Hyrax::Indexers::PcdmObjectIndexer`.
    
      The old aliases are supported with deprecation warnings.
    
    - Implementing `Hyrax::Indexers::ResourceIndexer()` and
      `Hyrax::Indexers::PcdmObjectIndexer()` to match
      `Hyrax::Forms::ResourceForm()` and `Hyrax::Forms::PcdmObjectForm()`.
    marrus-sh committed Nov 16, 2023
    Configuration menu
    Copy the full SHA
    f633bfa View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    382e7b7 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    a73baed View commit details
    Browse the repository at this point in the history
  5. Update internal uses of indexers to use new API

    This is essentially just a find‐and‐replace of
    `Hyrax::Indexers::ResourceIndexer` in place of
    `Hyrax::ValkyrieIndexer`
    marrus-sh committed Nov 16, 2023
    Configuration menu
    Copy the full SHA
    9cfa614 View commit details
    Browse the repository at this point in the history