Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .env.test
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
ALMA_OPENURL=https://na06.alma.exlibrisgroup.com/view/uresolver/01MIT_INST/openurl?
FEATURE_TIMDEX_FULLTEXT=true
FEATURE_GEODATA=false
MIT_PRIMO_URL=https://mit.primo.exlibrisgroup.com
OPENALEX_EMAIL=FAKE_OPENALEX_EMAIL
PRIMO_API_KEY=FAKE_PRIMO_API_KEY
PRIMO_API_URL=https://api-na.hosted.exlibrisgroup.com/primo/v1
PRIMO_SCOPE=cdi
Expand All @@ -15,4 +17,3 @@ TIMDEX_HOST=FAKE_TIMDEX_HOST
TIMDEX_INDEX=FAKE_TIMDEX_INDEX
THIRDIRON_ID=FAKE_THIRDIRON_ID
THIRDIRON_KEY=FAKE_THIRDIRON_KEY
OPENALEX_EMAIL=FAKE_OPENALEX_EMAIL
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ may have unexpected consequences if applied to other TIMDEX UI apps.
- `FEATURE_TAB_PRIMO_ALL`: Display a tab for displaying the combined Primo data (CDI + Alma)
- `FEATURE_TAB_TIMDEX_ALL`: Display a tab for displaying the combined TIMDEX data. `TIMDEX_INDEX` affects which data appears in this tab.
- `FEATURE_TAB_TIMDEX_ALMA`: Display a tab for displaying Alma data from TIMDEX. `TIMDEX_INDEX` must include `Alma` data or no results will return.
- `FEATURE_TIMDEX_FULLTEXT`: Activate fulltext searching for sources in TIMDEX that support it
- `FILTER_ACCESS_TO_FILES`: The name to use instead of "Access to files" for that filter / aggregation.
- `FILTER_CONTENT_TYPE`: The name to use instead of "Content type" for that filter / aggregation.
- `FILTER_CONTRIBUTOR`: The name to use instead of "Contributor" for that filter / aggregation.
Expand Down
1 change: 1 addition & 0 deletions app/controllers/search_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,7 @@ def fetch_timdex_data(offset: nil, per_page: nil)
query = QueryBuilder.new(@enhanced_query).query
query['from'] = offset.to_s if offset
query['size'] = per_page.to_s if per_page
query['fulltext'] = true if Feature.enabled?(:timdex_fulltext)

response = query_timdex(query)
errors = extract_errors(response)
Expand Down
2 changes: 1 addition & 1 deletion app/models/feature.rb
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
class Feature
# List of all valid features in the application
VALID_FEATURES = %i[geodata boolean_picker oa_always simulate_search_latency tab_primo_all tab_timdex_all
tab_timdex_alma record_link].freeze
tab_timdex_alma record_link timdex_fulltext].freeze

# Check if a feature is enabled by name
#
Expand Down
4 changes: 4 additions & 0 deletions app/models/timdex_search.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ class TimdexSearch < TimdexBase
$index: String
$from: String
$booleanType: String
$fulltext: Boolean
$perPage: Int
$accessToFilesFilter: [String!]
$contentTypeFilter: [String!]
$contributorsFilter: [String!]
Expand All @@ -37,6 +39,8 @@ class TimdexSearch < TimdexBase
index: $index
from: $from
booleanType: $booleanType
fulltext: $fulltext
perPage: $perPage
accessToFilesFilter: $accessToFilesFilter
contentTypeFilter: $contentTypeFilter
contributorsFilter: $contributorsFilter
Expand Down
43 changes: 22 additions & 21 deletions test/vcr_cassettes/data.yml

Large diffs are not rendered by default.

37 changes: 19 additions & 18 deletions test/vcr_cassettes/data_from_ridiculous_start.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

43 changes: 22 additions & 21 deletions test/vcr_cassettes/data_page_2.yml

Large diffs are not rendered by default.

41 changes: 21 additions & 20 deletions test/vcr_cassettes/timdex_empty_search.yml

Large diffs are not rendered by default.

27 changes: 14 additions & 13 deletions test/vcr_cassettes/timdex_error.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

39 changes: 20 additions & 19 deletions test/vcr_cassettes/timdex_no_results.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading