diff --git a/lib/authority_browse/names.rb b/lib/authority_browse/names.rb index b59d1efa..566d8e03 100644 --- a/lib/authority_browse/names.rb +++ b/lib/authority_browse/names.rb @@ -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 diff --git a/spec/authority_browse/term_fetcher_spec.rb b/spec/authority_browse/term_fetcher_spec.rb index 517c0c05..391610b9 100644 --- a/spec/authority_browse/term_fetcher_spec.rb +++ b/spec/authority_browse/term_fetcher_spec.rb @@ -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, @@ -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 diff --git a/spec/fixtures/term_fetcher_page.json b/spec/fixtures/term_fetcher_page.json index 48fa3bcb..f1f44a15 100644 --- a/spec/fixtures/term_fetcher_page.json +++ b/spec/fixtures/term_fetcher_page.json @@ -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": { @@ -15,7 +15,7 @@ }, "facets": { "count": 17795228, - "author_authoritative_browse": { + "author_browse_terms": { "numBuckets": 4, "allBuckets": { "count": 27401423 diff --git a/spec/fixtures/terms.json b/spec/fixtures/terms.json index ffb9cbc8..12329dca 100644 --- a/spec/fixtures/terms.json +++ b/spec/fixtures/terms.json @@ -3,7 +3,7 @@ "status":0, "QTime":41}, "terms":{ - "author_authoritative_browse": + "author_browse_terms": [ ["Twain, Mark 1835-1910",3], ["Twain, Mark,",8],