Skip to content

Loading…

Remove dead 'additional links' code #8

Merged
merged 1 commit into from

2 participants

@jamiecobbett

The additional_links field was originally used in parted content (guides,
benefits) to display links to the individual parts. We're not displaying
these links any more in the search results, nor are we submitting them to
Rummager.

Related: alphagov/rummager#75

@jamiecobbett jamiecobbett Remove dead 'additional links' code
The additional_links field was originally used in parted content (guides,
benefits) to display links to the individual parts. We're not displaying
these links any more in the search results, nor are we submitting them to
Rummager.
db28367
@fatbusinessman fatbusinessman merged commit 9a0eb9e into master
@fatbusinessman fatbusinessman deleted the remove-additional-links branch
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Mar 18, 2013
  1. @jamiecobbett

    Remove dead 'additional links' code

    jamiecobbett committed
    The additional_links field was originally used in parted content (guides,
    benefits) to display links to the individual parts. We're not displaying
    these links any more in the search results, nor are we submitting them to
    Rummager.
Showing with 3 additions and 24 deletions.
  1. +1 −3 lib/rummageable.rb
  2. +2 −21 test/rummageable_test.rb
View
4 lib/rummageable.rb
@@ -63,9 +63,7 @@ def commit(index_name = default_index)
%w[link],
%w[indexable_content],
%w[boost_phrases],
- %w[additional_links title],
- %w[additional_links link],
- %w[additional_links link_order],
+ %w[link_order],
]
def validate_structure(hash, parents=[])
View
23 test/rummageable_test.rb
@@ -16,11 +16,7 @@ def test_should_index_a_single_document_by_posting_it_as_json
"subsubsection" => "NAME OF SUBSUBSECTION",
"link" => "/link",
"indexable_content" => "TEXT",
- "boost_phrases" => "BOOST",
- "additional_links" => [
- {"title" => "LINK1", "link" => "/link1"},
- {"title" => "LINK2", "link" => "/link2"},
- ]
+ "boost_phrases" => "BOOST"
}
json = MultiJson.encode([document])
@@ -70,17 +66,6 @@ def test_should_raise_an_exception_if_a_document_has_unrecognised_keys
end
end
- def test_should_raise_an_exception_if_a_document_has_unrecognised_nested_keys
- document = {
- "additional_links" => [
- {"foo" => "bar"}
- ]
- }
- assert_raises Rummageable::InvalidDocument do
- Rummageable.index(document)
- end
- end
-
def test_allows_indexing_to_an_alternative_index
document = {
"title" => "TITLE",
@@ -90,11 +75,7 @@ def test_allows_indexing_to_an_alternative_index
"subsection" => "NAME OF SUBSECTION",
"link" => "/link",
"indexable_content" => "TEXT",
- "boost_phrases" => "BOOST",
- "additional_links" => [
- {"title" => "LINK1", "link" => "/link1"},
- {"title" => "LINK2", "link" => "/link2"},
- ]
+ "boost_phrases" => "BOOST"
}
json = MultiJson.encode([document])
Something went wrong with that request. Please try again.