Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

hyrax-v2_graph_indexer

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

hyrax-v2_graph_indexer

  • 0.5.0
  • Rubygems
  • Socket score

Version published
Maintainers
1
Created
Source

Hyrax::V2GraphIndexer

The Hyrax::V2GraphIndexer gem encapsulates a quasi-backport of the graph indexing now in Hyrax's main branch as well as the Hyrax 3.x release.

What do we mean by a quasi-backport? Namely it doesn't attempt to make the graphing configurable; instead when you include this gem you then replace the venerable and non-performant Samvera::NestingIndexer. You instead favor a the graph feature of SOLR.

Usage

Add this gem to your 2.9.x Hyrax application's Gemfile.

Installation

Add this line to your application's Gemfile:

gem "hyrax-v2_graph_indexer"

And then execute:

$ bundle

Or install it yourself as:

$ gem install hyrax-v2_graph_indexer

Prior to v0.5.0

For this to work, you'll need to add the following to your application's ./config/initializers/hyrax.rb:

Hyrax.config do |config|
  config.nested_relationship_reindexer = ->(id:, extent:) {}
end

With the upcoming v0.5.0, the above will be automatically added via the Hyrax::V2GraphIndexer::Railtie.

Contributing

Discussion

This gem does not have much in the way of tests; it has instead been tested against production implementations. The lack of tests is a concession to the return on investment of writing tests for a previous major version of Hyrax which no longer sees updates.

This code was added to Adventist's Hyku code-base in the fddb2863 commit.

From that commit message:

Prior to this commit, we had disabled the logic for indexing the parent child relationships of objects. This results in broken behavior regarding nesting collections and works. Were we to enable the "classic" strategy for indexing, we created significant (and known) performance issues.

With this commit, we are taking code that was backported to the 3.x branch of Hyrax via samvera/hyrax#5858 and samvera/hyrax#5916 and projecting that onto the 2.9.x implementation.

This projection means that we are not directly backporting but instead structuring the code such that if you include it, it assumes you using SOLR's native graph indexing. The aforementioned PRs put those changes behind a configuration variable; which is not something that makes sense given this "hack."

This PR aims to resolve three issues, which by their nature, are inter-related. The issues are:

  • Adding works to a collection #59
  • Backporting graph indexing #68
  • Adding a collection to another collection #70

License

The gem is available as open source under the terms of the Apache 2.

FAQs

Package last updated on 08 Nov 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc