Skip to content

Commit

Permalink
don't collapse events
Browse files Browse the repository at this point in the history
  • Loading branch information
kjgarza committed Nov 28, 2019
1 parent b5ac7eb commit 4ef97d5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/queries/events_query.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ def initialize()
def doi_citations(doi)
pid = Event.new.normalize_doi(doi)
query = "(subj_id:\"#{pid}\" AND (relation_type_id:#{PASSIVE_RELATION_TYPES.join(' OR relation_type_id:')})) OR (obj_id:\"#{pid}\" AND (relation_type_id:#{ACTIVE_RELATION_TYPES.join(' OR relation_type_id:')}))"
results = Event.query(query, doi:doi, aggregations: "citation_count_aggregation", unqiue: true).response.aggregations.citations.buckets
results = Event.query(query, doi:doi, aggregations: "citation_count_aggregation", page: { size: 1, cursor: [] }).response.aggregations.citations.buckets
results.any? ? results.first.total.value : 0
end

Expand Down

0 comments on commit 4ef97d5

Please sign in to comment.