Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

github.com/onsdigital/dp-census-dataset-search-api

Package Overview
Dependencies
Alerts
File Explorer
Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

github.com/onsdigital/dp-census-dataset-search-api

  • v0.0.0-20200729170929-f24859d2cf71
  • Source
  • Go
  • Socket score

Version published
Created
Source

dp-census-dataset-search-api

This is the dataset search API application for census Alpha project. To provide a continuously improving working example of search features needed to answer questions posed during the 2021 census alpha project.

Requirements

In order to run the service locally you will need the following:

  • Go
  • Git
  • Java 8 or greater for elasticsearch
  • ElasticSearch (version 6.7 or 6.8)

Getting started

  • Clone the repo go get github.com/ONSdigital/dp-census-dataset-search-api
  • Run elasticsearch e.g. ./elasticsearch/bin/elasticsearch
  • Follow setting up data
  • Run make debug to start search API service

Follow swagger documentation on how to interact with local api, some examples are below:

curl -XOPTIONS localhost:10200/datasets -vvv
curl -XGET localhost:10200/datasets?q=cpih -vvv
curl -XGET localhost:10200/datasets?q=estimates -vvv
curl -XGET "localhost:10200/datasets?q=estimates&offset=5&limit=5" -vvv
Setting up data

Once elasticsearch is running and you can connect to your instance. Follow the instructions here to load in some prepared cmd datasets.

Configuration

Environment variableDefaultDescription
BIND_ADDR:10200The host and port to bind to
DATASET_INDEXdataset-testThe index in which the search datasets are stored against in elasticsearch
ELASTIC_SEARCH_URLhttp://localhost:9200The host name for elasticsearch
MAX_SEARCH_RESULTS_OFFSET1000The maximum offset for the number of results returned by search query
SIGN_ELASTICSEARCH_REQUESTSfalseBoolean flag to identify whether elasticsearch requests via elastic API need to be signed if elasticsearch cluster is running in aws

Notes

See command list for a list of helpful commands to run alongside setting up data, useful to check what search indexes exist and their individual mappings and number of documents etc..

One can run the unit tests with make test

FAQs

Package last updated on 29 Jul 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc