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

Discrepancy between Hyrax::SolrService#query and ActiveFedora::SolrService#query #6676

Closed
1 task
kirkkwang opened this issue Feb 7, 2024 · 0 comments · Fixed by #6677
Closed
1 task

Discrepancy between Hyrax::SolrService#query and ActiveFedora::SolrService#query #6676

kirkkwang opened this issue Feb 7, 2024 · 0 comments · Fixed by #6677

Comments

@kirkkwang
Copy link
Contributor

Descriptive summary

There is a discrepancy between Hyrax::SolrService#query and ActiveFedora::SolrService#query in what it returns.

Steps to reproduce the behavior in User Interface (UI)

  1. Using Bulkrax, initiate an export for all records
  2. See that it fails

Actual behavior (include screenshots if available)

Hyrax double_combo branch using Bulkrax hyrax-4-valkyrie-support branch

[32, 41] in /app/samvera/hyrax-webapp/gems/gems/bulkrax/app/factories/bulkrax/valkyrie_object_factory.rb
   32:     def self.query(q, **kwargs)
   33:       # TODO: Without the Hyrax::SolrService, what are we left with?  Someone could choose
   34:       # ActiveFedora::SolrService.
   35:       raise NotImplementedError, "#{self}.#{__method__}" unless defined?(Hyrax)
   36:       debugger
=> 37:       Hyrax::SolrService.query(q, **kwargs)
   38:     end
   39:
   40:     ##
   41:     # Retrieve properties from M3 model
(byebug) (q)
"has_model_ssim:(GenericWork OR Image OR GenericWorkResource OR ImageResource) "
(byebug) kwargs
{:fl=>"id,file_set_ids_ssim", :method=>:post, :rows=>2147483647}
(byebug) Hyrax::SolrService.query(q, **kwargs)
[]
(byebug) Hyrax::SolrService.query("*:*", **kwargs.merge(fq:q))
[{"id"=>"dc163b97-71dc-4efd-8fb6-c2b9021aa814"}]
(byebug) ActiveFedora::SolrService.query(q, **kwargs)
[{"id"=>"dc163b97-71dc-4efd-8fb6-c2b9021aa814"}]

Note that

Hyrax::SolrService.query(q, **kwargs) => []

while

ActiveFedora::SolrService.query(q, **kwargs) => [{"id"=>"dc163b97-71dc-4efd-8fb6-c2b9021aa814"}]

In order for a similar return value, using this seems to work

Hyrax::SolrService.query("*:*", **kwargs.merge(fq:q)) => [{"id"=>"dc163b97-71dc-4efd-8fb6-c2b9021aa814"}]

Acceptance Criteria/Expected Behavior

  • Hyrax::SolrService#query should return the same thing as ActiveFedora::SolrService#query or have something similar
jeremyf added a commit that referenced this issue Feb 7, 2024
In `ActiveFedora::SolrService` we always assign the `qt: 'standard'`.[1]

However, with [this old commit][1] we dropped passing the `qt:
'standard'` when we had `use_valkyrie` of true.

We discovered this bug when upgrading Hyku and Bulkrax to Hyrax v3.x and
some.

Closes #6676

Related to:

- #3857

[1]:https://github.com/samvera/active_fedora/blob/8e7d365a087974b4ff9b9217f792c0c049789de6/lib/active_fedora/solr_service.rb#L40-L48
[2]:be6104f
jeremyf added a commit that referenced this issue Feb 7, 2024
In `ActiveFedora::SolrService` we always assign the `qt: 'standard'`.[1]

However, with [this old commit][1] we dropped passing the `qt:
'standard'` when we had `use_valkyrie` of true.

We discovered this bug when upgrading Hyku and Bulkrax to Hyrax v3.x and
some.

Closes #6676

Related to:

- #3857

[1]:https://github.com/samvera/active_fedora/blob/8e7d365a087974b4ff9b9217f792c0c049789de6/lib/active_fedora/solr_service.rb#L40-L48
[2]:be6104f
jeremyf added a commit that referenced this issue Feb 7, 2024
In `ActiveFedora::SolrService` we always assign the `qt: 'standard'`.[1]

However, with [this old commit][1] we dropped passing the `qt:
'standard'` when we had `use_valkyrie` of true.

We discovered this bug when upgrading Hyku and Bulkrax to Hyrax v3.x and
some.

Closes #6676

Related to:

- #3857

[1]:https://github.com/samvera/active_fedora/blob/8e7d365a087974b4ff9b9217f792c0c049789de6/lib/active_fedora/solr_service.rb#L40-L48
[2]:be6104f
jeremyf added a commit that referenced this issue Feb 7, 2024
In `ActiveFedora::SolrService` we always assign the `qt: 'standard'`.[1]

However, with [this old commit][1] we dropped passing the `qt:
'standard'` when we had `use_valkyrie` of true.

We discovered this bug when upgrading Hyku and Bulkrax to Hyrax v3.x and
some.

Closes #6676

Related to:

- #3857

[1]:https://github.com/samvera/active_fedora/blob/8e7d365a087974b4ff9b9217f792c0c049789de6/lib/active_fedora/solr_service.rb#L40-L48
[2]:be6104f
jeremyf added a commit that referenced this issue Feb 7, 2024
In `ActiveFedora::SolrService` we always assign the `qt: 'standard'`.[1]

However, with [this old commit][1] we dropped passing the `qt:
'standard'` when we had `use_valkyrie` of true.

We discovered this bug when upgrading Hyku and Bulkrax to Hyrax v3.x and
some.

Closes #6676

Related to:

- #3857

[1]:https://github.com/samvera/active_fedora/blob/8e7d365a087974b4ff9b9217f792c0c049789de6/lib/active_fedora/solr_service.rb#L40-L48
[2]:be6104f
jeremyf added a commit that referenced this issue Feb 7, 2024
In `ActiveFedora::SolrService` we always assign the `qt: 'standard'`.[1]

However, with [this old commit][1] we dropped passing the `qt:
'standard'` when we had `use_valkyrie` of true.

We discovered this bug when upgrading Hyku and Bulkrax to Hyrax v3.x and
some.

Closes #6676

Related to:

- #3857

[1]:https://github.com/samvera/active_fedora/blob/8e7d365a087974b4ff9b9217f792c0c049789de6/lib/active_fedora/solr_service.rb#L40-L48
[2]:be6104f
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant