dp-search-api

module
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 11, 2019 License: MIT

README

dp-search-query

A Go application microservice to provide query functionality on to the ONS Website

/data?

URL Parameters

  1. uris [0..1]
  2. types [0..1]

URL Parameters

  1. term [0..1]
  2. size [0..1] default:10
  3. from [0..1] default:0
  4. index [0..1]
  5. type [0..*]
  6. sort [0..1] default: relevance, options: relevance,release_date,release_date_asc,first_letter,title
  7. queries [0..4] default: search , options: search,counts,departments,featured
  8. aggField: [0..1] default : _type ; the field that will be used to group on by the count query
  9. latest [0..1], options: [true|false], defaults: false filters both search and counts to include only the latest version where description.latestRelease: true
  10. withFirstLetter [0..1], options: a..Z and is restricted to search queries will only return results where the title starts with the letter ?
  11. uriPrefix [0..1], prefix filter on the URI.
  12. topic [0..1] topic filter , matches exact Topic
  13. topicWildcard [0..1] topic filter , matches Topics using Wildcard pattern matching
  14. highlight [0..1], options: [true|false], defaults: true, determines whether to include highlighting on the SEARCH results
  15. upcoming [0..1], options: [true|false], defaults: true, determines whether items in the SEARCH that are not published and not cancelled OR are published and are not due
  16. published [0..1], options: [true|false], defaults: true, determines whether items in the SEARCH that are published and not cancelled OR are cancelled and are due

timeseries/{cdid}

Remember to update the README and CHANGELOG files.

Configuration

An overview of the configuration options available, either as a table of environment variables, or with a link to a configuration guide.

Environment variable Default Description
BIND_ADDR :23900 The host and port to bind to
ELASTIC_URL "http://localhost:9200" Http url of the ElasticSearch server

Releasing

To package up the API uses make package

Deploying

Export the following variables;

  • export DATA_CENTER to the nomad datacenter to use.
  • export S3_TAR_FILE to a S3 location on where a release file can be found.
  • export ELASTIC_SEARCH_URL to elastic search url.

Then run make nomad this shall create a nomad plan within the root directory called dp-search-query.nomad

Contributing

See CONTRIBUTING for details.

License

Copyright © 2016-2017, Office for National Statistics (https://www.ons.gov.uk)

Released under MIT license, see LICENSE for details.

Directories

Path Synopsis
cmd

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL