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

Use lazy Solr results in CollectionAssociation#find_target #1358

Open
botimer opened this issue Sep 19, 2018 · 0 comments
Open

Use lazy Solr results in CollectionAssociation#find_target #1358

botimer opened this issue Sep 19, 2018 · 0 comments

Comments

@botimer
Copy link
Contributor

botimer commented Sep 19, 2018

Per

# TODO: don't reify, just store the solr results and lazily reify.
,

        def find_target
          # TODO: don't reify, just store the solr results and lazily reify.
          # For now, we set a hard limit of 1000 results.
          records = ActiveFedora::QueryResultBuilder.reify_solr_results(load_from_solr(rows: SolrService::MAX_ROWS))
          records.each { |record| set_inverse_instance(record) }
          records
        rescue ObjectNotFoundError, Ldp::Gone => e
          ActiveFedora::Base.logger.error "Solr and Fedora may be out of sync:\n" + e.message
          reset
          []
        end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Backlog
Development

No branches or pull requests

1 participant