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

Remove Saved Searches feature #1736

Merged
merged 1 commit into from
Aug 9, 2017
Merged

Remove Saved Searches feature #1736

merged 1 commit into from
Aug 9, 2017

Conversation

cbeer
Copy link
Member

@cbeer cbeer commented Aug 6, 2017

Fixes #520

The feature was buried in the UX and not more useful than e.g. browser bookmarks since our blacklight search urls are persistent URLs anyway.

@coveralls
Copy link

Coverage Status

Coverage increased (+0.05%) to 94.441% when pulling 0d7e962 on 520-remove-saved-searches into 4ae91ae on master.

@jkeck jkeck merged commit 36a0a0f into master Aug 9, 2017
@jkeck jkeck deleted the 520-remove-saved-searches branch August 9, 2017 21:19
@mark-dce
Copy link

@cbeer @jcoyne @jkeck Can anyone tell me if the actual tracking was removed from the application or just the UI for saved searches. We're seeing a really huge searches table in one of our Hyrax applications, and as best I can tell, we don't want it or need it. Is there an easy way for us to turn off search history tracking in an application that depends on Blacklight?

@jkeck
Copy link
Contributor

jkeck commented Oct 11, 2017

@mark-dce this PR doesn't stop tracking all-together. However; @mbklein submitted #1720 which can probably solve your problem. I don't have a good implementation to point to, but effectively you can configure a crawler detector that could just always return true so that all traffic is viewed as a crawler and no searches are serialized.

kosarko added a commit to kosarko/blacklight that referenced this pull request Sep 22, 2021
I did as suggested in projectblacklight#1736 (comment) to disable search tracking, ie `config.crawler_detector = lambda { |req| true }`, but that resulted in:
```
NameError in CatalogController#index
undefined local variable or method `current_user' for #<CatalogController:0x0000000000ceb8>

Did you mean?
current_or_guest_user
Extracted source (around line projectblacklight#76):
              
74  def agent_is_crawler?
75    crawler_proc = blacklight_config.crawler_detector
76    return false if crawler_proc.nil? || current_user.present?
77
78    crawler_proc.call(request)
79  end

Rails.root: /src/blacklightapp

Application Trace | Framework Trace | Full Trace
blacklight (7.13.2) app/controllers/concerns/blacklight/search_context.rb:76:in `agent_is_crawler?'
blacklight (7.13.2) app/controllers/concerns/blacklight/search_context.rb:41:in `find_search_session'
blacklight (7.13.2) app/controllers/concerns/blacklight/search_context.rb:32:in `current_search_session'
blacklight (7.13.2) app/controllers/concerns/blacklight/search_context.rb:37:in `set_current_search_session'
activesupport (6.1.3.2) lib/active_support/callbacks.rb:427:in `block in make_lambda'
```
I've installed blacklight without devise, I have no need for users logging in, yet.
The patch seems to fix the issue, it just checks something called `current_user` is defined...
bess pushed a commit that referenced this pull request Oct 21, 2021
I did as suggested in #1736 (comment) to disable search tracking, ie `config.crawler_detector = lambda { |req| true }`, but that resulted in:
```
NameError in CatalogController#index
undefined local variable or method `current_user' for #<CatalogController:0x0000000000ceb8>

Did you mean?
current_or_guest_user
Extracted source (around line #76):
              
74  def agent_is_crawler?
75    crawler_proc = blacklight_config.crawler_detector
76    return false if crawler_proc.nil? || current_user.present?
77
78    crawler_proc.call(request)
79  end

Rails.root: /src/blacklightapp

Application Trace | Framework Trace | Full Trace
blacklight (7.13.2) app/controllers/concerns/blacklight/search_context.rb:76:in `agent_is_crawler?'
blacklight (7.13.2) app/controllers/concerns/blacklight/search_context.rb:41:in `find_search_session'
blacklight (7.13.2) app/controllers/concerns/blacklight/search_context.rb:32:in `current_search_session'
blacklight (7.13.2) app/controllers/concerns/blacklight/search_context.rb:37:in `set_current_search_session'
activesupport (6.1.3.2) lib/active_support/callbacks.rb:427:in `block in make_lambda'
```
I've installed blacklight without devise, I have no need for users logging in, yet.
The patch seems to fix the issue, it just checks something called `current_user` is defined...
ShanaLMoore pushed a commit to samvera/hyku that referenced this pull request Jan 8, 2024
Removes SaveSearchesController as it is not longer supported. Blacklight::SavedSearched was removed in v7+
Adds storage.yml, a required file to boot up in production.

ref:
- https://github.com/projectblacklight/blacklight/wiki/Saved-Searches
- projectblacklight/blacklight#1736
jeremyf pushed a commit to samvera/hyku that referenced this pull request Feb 19, 2024
Removes SaveSearchesController as it is not longer supported. Blacklight::SavedSearched was removed in v7+
Adds storage.yml, a required file to boot up in production.

ref:
- https://github.com/projectblacklight/blacklight/wiki/Saved-Searches
- projectblacklight/blacklight#1736
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 this pull request may close these issues.

4 participants