Search¶

hepdata.modules.search.views

HEPData Search Views.

hepdata.modules.search.views¶

HEPData Search Views.

hepdata.modules.search.views.calculate_total_pages(query_result, max_results)[source]¶

Calculate the overall number of pages of results given the number of hits and max number of records displayed per page.

hepdata.modules.search.views.check_page(args)[source]¶

Get the page query parameter from the URL and if it doesn’t exist assign a default value.

hepdata.modules.search.views.check_max_results(args)[source]¶

Get the size query parameter from the URL and if it doesn’t exist assign a default value.

hepdata.modules.search.views.check_date(args)[source]¶

Get the date parameter from the URL and if it doesn’t exist assign a default value.

hepdata.modules.search.views.check_cmenergies(args)[source]¶

Get the cmenergies query parameter from the URL and convert to floats

hepdata.modules.search.views.sort_facets(facets)[source]¶

Sort the facets in an arbitrary way that we think is appropriate.

hepdata.modules.search.views.filter_facets(facets, total_hits)[source]¶

For the data keywords, show only the ones with >10 count, if there is more than 100 hits altogether. Filter out the empty ones.

hepdata.modules.search.views.parse_query_parameters(request_args)[source]¶

Get query parameters from the request and preprocess them.

Parameters:

request_args – [dict-like structure] Any structure supporting get calls

Result:

[dict] Parsed parameters

hepdata.modules.search.views.search_authors()[source]¶
hepdata.modules.search.views.get_facet(facets, facet_name)[source]¶
hepdata.modules.search.views.process_year_facet(request, facets)[source]¶
hepdata.modules.search.views.search()[source]¶

Main search endpoint. Parse the request, perform search and show the results.

hepdata.modules.search.views.all_ids()[source]¶

Get IDs for all records (since a given date) as a JSON list of integers.

Accepts query parameters:

  • inspire_ids: if set to a truthy value, return inspire IDs rather than HEPData record IDs

  • last_updated: return IDs updated since given date (in format YYYY-mm-dd)

  • sort_by: if set to latest, sort the results latest first

  • use_es: if set to a truthy values, use OpenSearch rather than the database to return the ids

Logo of HEPData

HEPData

HEPData web application.

Navigation

  • Installation
  • Development
  • CLI Commands
  • Modules
    • Converter
    • Dashboard
    • DOI Banner
    • Editor
    • Email
    • New INSPIRE API
    • Permissions
    • Records
    • Search
    • Stats
    • Submission
    • Theme
  • Utils
  • Contributing
  • Changes
  • License
  • Authors
  • Branding

  • HEPData@GitHub

Related Topics

  • Documentation overview
    • Modules
      • Previous: Records
      • Next: Stats

Quick search

©2016, CERN. | Page source
Fork me on GitHub