Skip to content

Commit

Permalink
Merge pull request #239 from samvera/keep_blanknodes
Browse files Browse the repository at this point in the history
do not discard blank nodes
  • Loading branch information
randalldfloyd authored May 8, 2019
2 parents 45c3cc2 + 4678db6 commit d28c1d3
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions lib/qa/authorities/linked_data/search_query.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ def initialize(search_config)
@search_config = search_config
end

attr_reader :search_config, :graph, :language, :access_time_s, :normalize_time_s
private :graph, :language, :access_time_s, :normalize_time_s
attr_reader :search_config, :full_graph, :filtered_graph, :language, :access_time_s, :normalize_time_s
private :full_graph, :filtered_graph, :language, :access_time_s, :normalize_time_s

delegate :subauthority?, :supports_sort?, :prefixes, :authority_name, to: :search_config

Expand Down Expand Up @@ -48,7 +48,7 @@ def search(query, language: nil, replacements: {}, subauth: nil, context: false,
def load_graph(url:)
access_start_dt = Time.now.utc

@graph = graph_service.load_graph(url: url)
@full_graph = graph_service.load_graph(url: url)

access_end_dt = Time.now.utc
@access_time_s = access_end_dt - access_start_dt
Expand All @@ -58,7 +58,7 @@ def load_graph(url:)
def normalize_results
normalize_start_dt = Time.now.utc

@graph = graph_service.filter(graph: @graph, language: language, remove_blanknode_subjects: true)
@filtered_graph = graph_service.filter(graph: @full_graph, language: language)
results = map_results
json = convert_results_to_json(results)

Expand All @@ -83,7 +83,7 @@ def map_results
)
end

results_mapper_service.map_values(graph: @graph, prefixes: prefixes, ldpath_map: ldpath_map,
results_mapper_service.map_values(graph: filtered_graph, prefixes: prefixes, ldpath_map: ldpath_map,
predicate_map: predicate_map, sort_key: :sort,
preferred_language: @language, context_map: context_map)
end
Expand Down

0 comments on commit d28c1d3

Please sign in to comment.