Skip to content

Commit

Permalink
change author_authoritative_browse to author_browse_terms
Browse files Browse the repository at this point in the history
  • Loading branch information
niquerio committed Feb 9, 2024
1 parent 6bb2c2c commit 6f4c382
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion lib/authority_browse/names.rb
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ def get_matched_query
#
# @return [String]
def field_name
"author_authoritative_browse"
"author_browse_terms"
end

# URL for LOC skos file
Expand Down
4 changes: 2 additions & 2 deletions spec/authority_browse/term_fetcher_spec.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
RSpec.describe AuthorityBrowse::TermFetcher do
before(:each) do
@params = {
field_name: "author_authoritative_browse",
field_name: "author_browse_terms",
table: :names_from_biblio,
database_klass: AuthorityBrowse::DB::Names,
page_size: 3,
Expand Down Expand Up @@ -82,7 +82,7 @@
it "loads all terms into names from biblio" do
body = fixture("term_fetcher_page.json")
second_page = JSON.parse(body)
second_page["facets"]["author_authoritative_browse"]["buckets"] = [
second_page["facets"]["author_browse_terms"]["buckets"] = [
{
"val" => "z",
"count" => 3
Expand Down
4 changes: 2 additions & 2 deletions spec/fixtures/term_fetcher_page.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"status": 0,
"QTime": 1993,
"params": {
"json": "{\"query\":\"*:*\",\"limit\":0,\"facet\":{\"author_authoritative_browse\":{\"type\":\"terms\",\"field\":\"author_authoritative_browse\",\"limit\":10,\"allBuckets\":true,\"offset\":0,\"sort\":\"index asc\"}}}"
"json": "{\"query\":\"*:*\",\"limit\":0,\"facet\":{\"author_browse_terms\":{\"type\":\"terms\",\"field\":\"author_browse_terms\",\"limit\":10,\"allBuckets\":true,\"offset\":0,\"sort\":\"index asc\"}}}"
}
},
"response": {
Expand All @@ -15,7 +15,7 @@
},
"facets": {
"count": 17795228,
"author_authoritative_browse": {
"author_browse_terms": {
"numBuckets": 4,
"allBuckets": {
"count": 27401423
Expand Down
2 changes: 1 addition & 1 deletion spec/fixtures/terms.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"status":0,
"QTime":41},
"terms":{
"author_authoritative_browse":
"author_browse_terms":
[
["Twain, Mark 1835-1910",3],
["Twain, Mark,",8],
Expand Down

0 comments on commit 6f4c382

Please sign in to comment.